Skip to content
Snippets Groups Projects
Commit 6768c48b authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Add missing file data commit.

* fflush only moves data to the page cache, but does not ensure the data
  is actually written into permanent storage.
parent 4fb55aea
No related branches found
No related tags found
No related merge requests found
......@@ -403,7 +403,14 @@ int fileFlush(int fileID)
{
int retval = 0;
bfile_t *fileptr = file_to_pointer(fileID);
if ( fileptr ) retval = fflush(fileptr->fp);
if ( fileptr )
{
FILE *fp = fileptr->fp;
retval = fflush(fp);
if (retval == 0)
retval = fsync(fileno(fp));
if (retval != 0) retval = errno;
}
return retval;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment