tmpfile-util: add new LINK_TMPFILE_SYNC flag for syncing properly before/after linking in the file
This syncs the data before linking it in, and both data + dir once done. This should give us proper semantics for installing files safely into the fs.
This commit is contained in:
@@ -32,6 +32,7 @@ int fopen_tmpfile_linkable(const char *target, int flags, char **ret_path, FILE
|
||||
|
||||
typedef enum LinkTmpfileFlags {
|
||||
LINK_TMPFILE_REPLACE = 1 << 0,
|
||||
LINK_TMPFILE_SYNC = 1 << 1,
|
||||
} LinkTmpfileFlags;
|
||||
|
||||
int link_tmpfile_at(int fd, int dir_fd, const char *path, const char *target, LinkTmpfileFlags flags);
|
||||
|
||||
Reference in New Issue
Block a user