aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-12-14 00:04:52 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-12-14 00:06:50 +0100
commit13276810b1b892d4aad62e2362e00afbe654b5b2 (patch)
tree005e8939e890d9c64682781d5641e1f66e8c9c07
parent22fea7fcdb2299401e1fc7a96a837046c96f7168 (diff)
Fix unix istream eof flag
Propperly set the parent eof flag and not a local one that isn't accessed at all. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--lib/io/unix/istream.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/io/unix/istream.c b/lib/io/unix/istream.c
index 5898141..e0b728c 100644
--- a/lib/io/unix/istream.c
+++ b/lib/io/unix/istream.c
@@ -10,7 +10,6 @@ typedef struct {
istream_t base;
char *path;
int fd;
- bool eof;
sqfs_u8 buffer[BUFSZ];
} file_istream_t;
@@ -27,7 +26,7 @@ static int file_precache(istream_t *strm)
ret = read(file->fd, strm->buffer + strm->buffer_used, diff);
if (ret == 0) {
- file->eof = true;
+ strm->eof = true;
break;
}