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.
return 0;
p = procfs_file_alloca(pid, "attr/current");
- r = write_string_file(p, label, WRITE_STRING_FILE_CREATE);
+ r = write_string_file(p, label, 0);
if (r < 0)
return r;
#endif
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) {