mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-04-15 23:46:58 +02:00
fs: fix incorrect cursor state after pread/pwrite
This commit is contained in:
parent
8e64a8a107
commit
3dedbea70d
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue