summaryrefslogtreecommitdiffstats
path: root/c/src/exec
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-02-10 17:04:54 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-02-10 17:04:54 +0000
commitefb1b830bbcb4bae5df881c82bab5d2dec4b119d (patch)
treeef1d3008091eeeb6722b9a39773fad7bd2c09788 /c/src/exec
parentAdded getcwd(). (diff)
downloadrtems-efb1b830bbcb4bae5df881c82bab5d2dec4b119d.tar.bz2
Corrected multiple places the file size was not being properly updated.
Diffstat (limited to 'c/src/exec')
-rw-r--r--c/src/exec/libfs/src/imfs/memfile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/c/src/exec/libfs/src/imfs/memfile.c b/c/src/exec/libfs/src/imfs/memfile.c
index 01aee443f3..eda9d6b4a1 100644
--- a/c/src/exec/libfs/src/imfs/memfile.c
+++ b/c/src/exec/libfs/src/imfs/memfile.c
@@ -145,10 +145,14 @@ int memfile_write(
)
{
IMFS_jnode_t *the_jnode;
+ int status;
the_jnode = iop->file_info;
- return IMFS_memfile_write( the_jnode, iop->offset, buffer, count );
+ status = IMFS_memfile_write( the_jnode, iop->offset, buffer, count );
+ iop->size = the_jnode->info.file.size;
+
+ return status;
}
/*
@@ -191,7 +195,8 @@ int memfile_lseek(
if (IMFS_memfile_extend( the_jnode, iop->offset ))
set_errno_and_return_minus_one( ENOSPC );
- return 0;
+ iop->size = the_jnode->info.file.size;
+ return iop->offset;
}
/*
@@ -231,6 +236,7 @@ int memfile_ftruncate(
*/
the_jnode->info.file.size = length;
+ iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );