fileio: consolidate write_string_file*()
Merge write_string_file(), write_string_file_no_create() and write_string_file_atomic() into write_string_file() and provide a flags mask that allows combinations of atomic writing, newline appending and automatic file creation. Change all users accordingly.
This commit is contained in:
+1
-1
@@ -4716,7 +4716,7 @@ int update_reboot_param_file(const char *param) {
|
||||
|
||||
if (param) {
|
||||
|
||||
r = write_string_file(REBOOT_PARAM_FILE, param);
|
||||
r = write_string_file(REBOOT_PARAM_FILE, param, WRITE_STRING_FILE_CREATE);
|
||||
if (r < 0)
|
||||
log_error("Failed to write reboot param to "
|
||||
REBOOT_PARAM_FILE": %s", strerror(-r));
|
||||
|
||||
Reference in New Issue
Block a user