[Yaffs] [PATCH 17/20] Fixed return value of ycb_file_lseek()…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Xiangfu Liu
Date:  
To: yaffs
CC: sebastien
Old-Topics: [Yaffs] [PATCH 16/20] Fixed double offset update.
New-Topics: [Yaffs] [PATCH 18/20] Build with debug symbols
Subject: [Yaffs] [PATCH 17/20] Fixed return value of ycb_file_lseek().
From: Sebastian Huber <>

---
 rtems/rtems_yaffs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/rtems/rtems_yaffs.c b/rtems/rtems_yaffs.c
index b95902a..b9ae049 100644
--- a/rtems/rtems_yaffs.c
+++ b/rtems/rtems_yaffs.c
@@ -776,10 +776,10 @@ static ssize_t ycb_file_write(rtems_libio_t *iop, const void *buffer, size_t cou
     return rv;
 }


-static rtems_off64_t ycb_file_lseek(rtems_libio_t *iop, rtems_off64_t length, int whence)
+static rtems_off64_t ycb_file_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
 {
     if (is_valid_offset(iop->offset)) {
-        return 0;
+        return iop->offset;
     } else {
         rtems_set_errno_and_return_minus_one(EINVAL);
     }
-- 
1.7.4.1