From 4c1fc3e404d648c70bd2f50ac50aeac6ece8872e Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Mon, 6 Jul 2015 19:19:25 -0400 Subject: 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. --- src/core/execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/execute.c') diff --git a/src/core/execute.c b/src/core/execute.c index c92db51330..61e7304dc7 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1446,7 +1446,7 @@ static int exec_child( * shouldn't trip up over that. */ sprintf(t, "%i", context->oom_score_adjust); - r = write_string_file("/proc/self/oom_score_adj", t); + r = write_string_file("/proc/self/oom_score_adj", t, WRITE_STRING_FILE_CREATE); if (r == -EPERM || r == -EACCES) { log_open(); log_unit_debug_errno(unit, r, "Failed to adjust OOM setting, assuming containerized execution, ignoring: %m"); -- cgit v1.2.3-54-g00ecf