forked from Imagelibrary/rtems
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;
|
the_jnode = iop->file_info;
|
||||||
|
|
||||||
|
if (iop->flags & LIBIO_FLAGS_APPEND)
|
||||||
|
iop->offset = the_jnode->info.file.size;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user