tree-wide: start properly syncing at various places we so far didn't

Let's better be safe than sorry, and install files fully safely now that
is is easy.
This commit is contained in:
Lennart Poettering
2023-06-13 09:50:10 +02:00
parent 74402bf01a
commit 8dfd099b50
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -454,7 +454,7 @@ static int install_loader_config(const char *esp_path) {
fprintf(f, "default %s-*\n", arg_entry_token);
}
r = flink_tmpfile(f, t, p, /* flags= */ 0);
r = flink_tmpfile(f, t, p, LINK_TMPFILE_SYNC);
if (r == -EEXIST)
return 0; /* Silently skip creation if the file exists now (recheck) */
if (r < 0)
@@ -483,7 +483,7 @@ static int install_loader_specification(const char *root) {
fprintf(f, "type1\n");
r = flink_tmpfile(f, t, p, /* flags= */ 0);
r = flink_tmpfile(f, t, p, LINK_TMPFILE_SYNC);
if (r == -EEXIST)
return 0; /* Silently skip creation if the file exists now (recheck) */
if (r < 0)