summaryrefslogtreecommitdiffstats
path: root/c/src/exec/libfs/src/imfs
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-26 14:49:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-26 14:49:58 +0000
commite42a135973d4a7d41a6e76f7504c6df4cb6dd645 (patch)
tree983f3082866a6a442e9c02fe9ce5e8157b445401 /c/src/exec/libfs/src/imfs
parentPatch from Chris Johns <cjohns@cybertec.com.au> and (diff)
downloadrtems-e42a135973d4a7d41a6e76f7504c6df4cb6dd645.tar.bz2
Patch from Chris Johns <cjohns@cybertec.com.au> and
Jennifer Averett <jennifer.averett@oarcorp.com> to fix appends (O_APPEND at open time) on in-memory files. A call such as: fd = open (file, O_APPEND | O_WRONLY); did not append to the end of the file.
Diffstat (limited to 'c/src/exec/libfs/src/imfs')
-rw-r--r--c/src/exec/libfs/src/imfs/memfile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/exec/libfs/src/imfs/memfile.c b/c/src/exec/libfs/src/imfs/memfile.c
index dad120a0a7..a2dc695044 100644
--- a/c/src/exec/libfs/src/imfs/memfile.c
+++ b/c/src/exec/libfs/src/imfs/memfile.c
@@ -91,6 +91,9 @@ int memfile_open(
the_jnode = iop->file_info;
+ if (iop->flags & LIBIO_FLAGS_APPEND)
+ iop->offset = the_jnode->info.file.size;
+
return 0;
}