From ad118bda159d3f9c27c5a15ace54cf808a6e8788 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Mon, 6 Jul 2015 19:27:20 -0400 Subject: tree-wide: fix write_string_file() user that should not create files The latest consolidation cleanup of write_string_file() revealed some users of that helper which should have used write_string_file_no_create() in the past but didn't. Basically, all existing users that write to files in /sys and /proc should not expect to write to a file which is not yet existant. --- src/shared/sysctl-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shared/sysctl-util.c') diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c index 232a005054..1de0b94fd5 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, WRITE_STRING_FILE_CREATE); + return write_string_file(p, value, 0); } int sysctl_read(const char *property, char **content) { -- cgit v1.2.3