From 5f3ad6a89d21f443db8ea4fe1e42de7e88475110 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 26 Jun 2000 14:50:00 +0000 Subject: Patch from Chris Johns and Jennifer Averett 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. --- c/src/lib/libc/memfile.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- cgit v1.2.3