basic/fileio: extend atomic file writing with timestamp setting

There should be no functional change.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-05-11 10:23:36 -04:00
parent 488ab41cb8
commit 39c38d773f
4 changed files with 26 additions and 9 deletions
+4 -1
View File
@@ -24,7 +24,10 @@
#include "fileio.h"
int write_string_file_atomic_label(const char *fn, const char *line);
int write_string_file_atomic_label_ts(const char *fn, const char *line, struct timespec *ts);
static inline int write_string_file_atomic_label(const char *fn, const char *line) {
return write_string_file_atomic_label_ts(fn, line, NULL);
}
int write_env_file_label(const char *fname, char **l);
int fopen_temporary_label(const char *target,
const char *path, FILE **f, char **temp_path);