diff options
author | Daniel Mack <daniel@zonque.org> | 2015-07-06 19:27:20 -0400 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-07-06 19:27:20 -0400 |
commit | ad118bda159d3f9c27c5a15ace54cf808a6e8788 (patch) | |
tree | 43eeba4758137b413f7f80f29dd41ded3004d051 /src/udev | |
parent | 4c1fc3e404d648c70bd2f50ac50aeac6ece8872e (diff) |
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.
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udevd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 8a31089c0c..0661f7be00 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -398,7 +398,7 @@ static void worker_spawn(Manager *manager, struct event *event) { prctl(PR_SET_PDEATHSIG, SIGTERM); /* reset OOM score, we only protect the main daemon */ - write_string_file("/proc/self/oom_score_adj", "0", WRITE_STRING_FILE_CREATE); + write_string_file("/proc/self/oom_score_adj", "0", 0); for (;;) { struct udev_event *udev_event; @@ -1747,7 +1747,7 @@ int main(int argc, char *argv[]) { setsid(); - write_string_file("/proc/self/oom_score_adj", "-1000", WRITE_STRING_FILE_CREATE); + write_string_file("/proc/self/oom_score_adj", "-1000", 0); } r = run(fd_ctrl, fd_uevent, cgroup); |