From e42a135973d4a7d41a6e76f7504c6df4cb6dd645 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 26 Jun 2000 14:49:58 +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/exec/libfs/src/imfs/memfile.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'c/src/exec/libfs/src/imfs/memfile.c') 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; } -- cgit v1.2.3