diff options
author | Daniel Mack <daniel@zonque.org> | 2015-07-06 19:19:25 -0400 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-07-06 19:19:25 -0400 |
commit | 4c1fc3e404d648c70bd2f50ac50aeac6ece8872e (patch) | |
tree | 977a223a8f5aa7fc2a5861a8d557b879bfc98a9f /src/shared | |
parent | 40beecdb6d1c73e5acb62ebac2ccbfd7891f2418 (diff) |
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.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/sysctl-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c index 55f4e48601..232a005054 100644 --- a/src/shared/sysctl-util.c +++ b/src/shared/sysctl-util.c @@ -66,7 +66,7 @@ int sysctl_write(const char *property, const char *value) { log_debug("Setting '%s' to '%s'", property, value); p = strjoina("/proc/sys/", property); - return write_string_file(p, value); + return write_string_file(p, value, WRITE_STRING_FILE_CREATE); } int sysctl_read(const char *property, char **content) { |