diff --git a/src/fs/pread.c b/src/fs/pread.c index d06f777..4d519f1 100644 --- a/src/fs/pread.c +++ b/src/fs/pread.c @@ -19,6 +19,6 @@ ssize_t pread(int fd, void *buf, size_t size, off_t offset) end: /* At the end, always try to restore the current position */ - lseek(fd, current, SEEK_CUR); + lseek(fd, current, SEEK_SET); return rc; } diff --git a/src/fs/pwrite.c b/src/fs/pwrite.c index 10b8ff7..b42ff5c 100644 --- a/src/fs/pwrite.c +++ b/src/fs/pwrite.c @@ -17,6 +17,6 @@ ssize_t pwrite(int fd, const void *buf, size_t size, off_t offset) end: /* At the end, always try to restore the current position */ - lseek(fd, current, SEEK_CUR); + lseek(fd, current, SEEK_SET); return rc; }