dirfile_metaflush (3) - Linux Man Pages

dirfile_metaflush: close a dirfile and free associated memory.


dirfile_metaflush --- close a dirfile and free associated memory.


#include <getdata.h>
int dirfile_metaflush(DIRFILE *dirfile);


The dirfile_metaflush() function flushes all pending metadata changes in the dirfile specified by dirfile to disk. This is accomplished by re-writing the format file fragments containing modified metadata. Format file fragments which are unchanged are not touched. This function flushes only metadata. To flush the field data as well, call dirfile_flush(3) instead.


On success, zero is returned. On error, -1 is returned and the dirfile error is set to a non-zero error value. Possible error values are:
The supplied dirfile was invalid.
An internal error occurred in the library while trying to perform the task. This indicates a bug in the library. Please report the incident to the maintainer.
A temporary file could not be opened into which to write the modified metadata. The dirfile error may be retrieved by calling get_error(3). A descriptive error string for the last error encountered can be obtained from a call to get_error_string(3).