diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-06-26 14:49:58 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-06-26 14:49:58 +0000 |
commit | e42a135973d4a7d41a6e76f7504c6df4cb6dd645 (patch) | |
tree | 983f3082866a6a442e9c02fe9ce5e8157b445401 /cpukit/libfs | |
parent | Patch from Chris Johns <cjohns@cybertec.com.au> and (diff) | |
download | rtems-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 'cpukit/libfs')
-rw-r--r-- | cpukit/libfs/src/imfs/memfile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c index dad120a0a7..a2dc695044 100644 --- a/cpukit/libfs/src/imfs/memfile.c +++ b/cpukit/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; } |