summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-02 20:31:42 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-03 20:12:56 +0200
commit574d5f2dfc25226afc718aa5ba1a145fe5cad221 (patch)
tree01fc6b70bd622d40da1c60fd04d1f15c85aebd93 /src/core
parentb6e8f1f03dc8b7579f8c6b00372f136d74c45232 (diff)
util: rename write_one_line_file() to write_string_file()
You can write much more than just one line with this call (and we frequently do), so let's correct the naming.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/cgroup-attr.c2
-rw-r--r--src/core/execute.c2
-rw-r--r--src/core/machine-id-setup.c2
-rw-r--r--src/core/unit.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/core/cgroup-attr.c b/src/core/cgroup-attr.c
index 2ab4d4623e..7e3e08eabb 100644
--- a/src/core/cgroup-attr.c
+++ b/src/core/cgroup-attr.c
@@ -44,7 +44,7 @@ int cgroup_attribute_apply(CGroupAttribute *a, CGroupBonding *b) {
if (r < 0)
return r;
- r = write_one_line_file(path, v ? v : a->value);
+ r = write_string_file(path, v ? v : a->value);
if (r < 0)
log_warning("Failed to write '%s' to %s: %s", v ? v : a->value, path, strerror(-r));
diff --git a/src/core/execute.c b/src/core/execute.c
index f7353579e9..91815b838e 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -1195,7 +1195,7 @@ int exec_spawn(ExecCommand *command,
snprintf(t, sizeof(t), "%i", context->oom_score_adjust);
char_array_0(t);
- if (write_one_line_file("/proc/self/oom_score_adj", t) < 0) {
+ if (write_string_file("/proc/self/oom_score_adj", t) < 0) {
err = -errno;
r = EXIT_OOM_ADJUST;
goto fail_child;
diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c
index 146c5653c9..51074fea44 100644
--- a/src/core/machine-id-setup.c
+++ b/src/core/machine-id-setup.c
@@ -216,7 +216,7 @@ int machine_id_setup(void) {
* /run/machine-id as a replacement */
m = umask(0022);
- r = write_one_line_file("/run/machine-id", id);
+ r = write_string_file("/run/machine-id", id);
umask(m);
if (r < 0) {
diff --git a/src/core/unit.c b/src/core/unit.c
index 91a00edf71..a0d36569a8 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2910,7 +2910,7 @@ int unit_write_drop_in(Unit *u, bool runtime, const char *name, const char *data
return r;
mkdir_p(p, 0755);
- return write_one_line_file_atomic_label(q, data);
+ return write_string_file_atomic_label(q, data);
}
int unit_remove_drop_in(Unit *u, bool runtime, const char *name) {