diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-06-26 14:50:00 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-06-26 14:50:00 +0000 |
commit | 5f3ad6a89d21f443db8ea4fe1e42de7e88475110 (patch) | |
tree | 32779e4e1d46d58c076cbd1135e6a1034e0373a7 | |
parent | Patch from Chris Johns <cjohns@cybertec.com.au> and (diff) | |
download | rtems-5f3ad6a89d21f443db8ea4fe1e42de7e88475110.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.
-rw-r--r-- | c/src/lib/libc/memfile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libc/memfile.c b/c/src/lib/libc/memfile.c index dad120a0a7..a2dc695044 100644 --- a/c/src/lib/libc/memfile.c +++ b/c/src/lib/libc/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; } |