diff options
author | Xiangfu <xiangfu@openmobilefree.net> | 2012-05-14 15:36:03 +0800 |
---|---|---|
committer | Xiangfu <xiangfu@openmobilefree.net> | 2012-05-14 15:36:03 +0800 |
commit | 34cc1b910b6429beb46fcc88aa53a37fd2e649c4 (patch) | |
tree | 7ff3968fcf023d5ff505dbf28268cef18b4d87e2 | |
parent | cbe7492ee0e5a9bced8267d9c7ab2fd997299fda (diff) |
Update rtems_yaffs due to rtems rtems_libio_tt changed
-rw-r--r-- | rtems/rtems_yaffs.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/rtems/rtems_yaffs.c b/rtems/rtems_yaffs.c index a573ae7..d14cbcc 100644 --- a/rtems/rtems_yaffs.c +++ b/rtems/rtems_yaffs.c @@ -548,7 +548,6 @@ static int ryfs_file_open(rtems_libio_t *iop, const char *pathname, int oflag, m ylock(dev); length = yaffs_get_obj_length(obj); - iop->size = length; if ((iop->flags & LIBIO_FLAGS_APPEND) != 0) { iop->offset = length; } @@ -616,7 +615,7 @@ static ssize_t ryfs_file_write(rtems_libio_t *iop, const void *buffer, size_t co if (is_valid_offset(new_offset)) { rv = yaffs_wr_file(obj, buffer, offset, (int) count, 0); if (rv > 0) { - iop->size = yaffs_get_obj_length(obj); + iop->offset = new_offset; } else { errno = ENOSPC; } @@ -648,9 +647,7 @@ static int ryfs_file_ftruncate(rtems_libio_t *iop, off_t length) yc = yaffs_resize_file(obj, length); yunlock(dev); - if (yc == YAFFS_OK) { - iop->size = length; - } else { + if (yc != YAFFS_OK) { errno = EIO; rv = -1; } |