diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-04 07:39:30 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-04 07:39:30 -0600 |
commit | 52ccaf61e22d31f85c64a87de5eaee61fcdc8aa2 (patch) | |
tree | 810bb4c1a2ac32e2003579bbcdf1e3ddc2919089 | |
parent | b0ef2c071b7fb32b3a90866d0d219f3edda6688c (diff) | |
download | px4-nuttx-52ccaf61e22d31f85c64a87de5eaee61fcdc8aa2.tar.gz px4-nuttx-52ccaf61e22d31f85c64a87de5eaee61fcdc8aa2.tar.bz2 px4-nuttx-52ccaf61e22d31f85c64a87de5eaee61fcdc8aa2.zip |
First pread/pwrite typo fixes
-rw-r--r-- | nuttx/fs/vfs/fs_pread.c | 4 | ||||
-rw-r--r-- | nuttx/fs/vfs/fs_pwrite.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/fs/vfs/fs_pread.c b/nuttx/fs/vfs/fs_pread.c index 621ffa7ff..3e4943439 100644 --- a/nuttx/fs/vfs/fs_pread.c +++ b/nuttx/fs/vfs/fs_pread.c @@ -101,7 +101,7 @@ ssize_t pread(int fd, FAR void *buf, size_t nbytes, off_t offset) /* Then seek to the correct position in the file */ - pos = lseek(fd, offset, SEEK_CUR); + pos = lseek(fd, offset, SEEK_SET); if (pos == (off_t)-1) { /* This might fail is the offset is beyond the end of file */ @@ -116,7 +116,7 @@ ssize_t pread(int fd, FAR void *buf, size_t nbytes, off_t offset) /* Restore the file position */ - pos = lseek(fd, savepos, SEEK_CUR); + pos = lseek(fd, savepos, SEEK_SET); if (pos == (off_t)-1 && ret >= 0) { /* This really should not fail */ diff --git a/nuttx/fs/vfs/fs_pwrite.c b/nuttx/fs/vfs/fs_pwrite.c index a1e6a05d4..e7c1cf700 100644 --- a/nuttx/fs/vfs/fs_pwrite.c +++ b/nuttx/fs/vfs/fs_pwrite.c @@ -99,7 +99,7 @@ ssize_t pwrite(int fd, FAR const void *buf, size_t nbytes, off_t offset) /* Then seek to the correct position in the file */ - pos = lseek(fd, offset, SEEK_CUR); + pos = lseek(fd, offset, SEEK_SET); if (pos == (off_t)-1) { /* This might fail is the offset is beyond the end of file */ @@ -114,7 +114,7 @@ ssize_t pwrite(int fd, FAR const void *buf, size_t nbytes, off_t offset) /* Restore the file position */ - pos = lseek(fd, savepos, SEEK_CUR); + pos = lseek(fd, savepos, SEEK_SET); if (pos == (off_t)-1 && ret >= 0) { /* This really should not fail */ |