summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc
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/lib/libc
parent5e0e012cda56b129bb570b8f23d2a22d48137ada (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/lib/libc')
-rw-r--r--c/src/lib/libc/memfile.c3
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;
}