From dfccac65f0aee6de07550eded8bb14420f9f2268 Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Mon, 14 May 2012 16:04:23 +0800 Subject: rtems_yaffs: don't set offset when write file --- rtems/rtems_yaffs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rtems/rtems_yaffs.c b/rtems/rtems_yaffs.c index d14cbcc..8cb25e0 100644 --- a/rtems/rtems_yaffs.c +++ b/rtems/rtems_yaffs.c @@ -614,9 +614,7 @@ static ssize_t ryfs_file_write(rtems_libio_t *iop, const void *buffer, size_t co new_offset = offset + count; if (is_valid_offset(new_offset)) { rv = yaffs_wr_file(obj, buffer, offset, (int) count, 0); - if (rv > 0) { - iop->offset = new_offset; - } else { + if (rv <= 0) { errno = ENOSPC; } } else { -- cgit v1.2.3