mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user