diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-07-08 17:13:53 -0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-07-08 17:13:53 -0300 |
commit | 1434eb3838581f8ee1cef1f15ce9bcd45398183c (patch) | |
tree | 06569be09f377c94322f1c6522b85f8c62376887 /src/firstboot | |
parent | 380aea0c5ba373df9fe37bdf0404442bd9034b92 (diff) | |
parent | ad118bda159d3f9c27c5a15ace54cf808a6e8788 (diff) |
Merge pull request #500 from zonque/fileio
fileio: consolidate write_string_file*()
Diffstat (limited to 'src/firstboot')
-rw-r--r-- | src/firstboot/firstboot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index cda96d484a..3805b29437 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -415,7 +415,7 @@ static int process_hostname(void) { return 0; mkdir_parents(etc_hostname, 0755); - r = write_string_file(etc_hostname, arg_hostname); + r = write_string_file(etc_hostname, arg_hostname, WRITE_STRING_FILE_CREATE); if (r < 0) return log_error_errno(r, "Failed to write %s: %m", etc_hostname); @@ -436,7 +436,7 @@ static int process_machine_id(void) { return 0; mkdir_parents(etc_machine_id, 0755); - r = write_string_file(etc_machine_id, sd_id128_to_string(arg_machine_id, id)); + r = write_string_file(etc_machine_id, sd_id128_to_string(arg_machine_id, id), WRITE_STRING_FILE_CREATE); if (r < 0) return log_error_errno(r, "Failed to write machine id: %m"); |