fs: fix incorrect cursor state after pread/pwrite

This commit is contained in:
Lephe 2025-04-06 15:54:22 +02:00
parent 8e64a8a107
commit 3dedbea70d
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
2 changed files with 2 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;
}