summaryrefslogtreecommitdiff
path: root/src/core/dbus-execute.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/dbus-execute.c')
-rw-r--r--src/core/dbus-execute.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
index e21956def1..de29d5da04 100644
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
@@ -842,7 +842,7 @@ int bus_exec_context_set_transient_property(
else if (free_and_strdup(&c->user, uu) < 0)
return -ENOMEM;
- unit_write_drop_in_private_format(u, mode, name, "User=%s\n", uu);
+ unit_write_drop_in_private_format(u, mode, name, "User=%s", uu);
}
return 1;
@@ -861,7 +861,7 @@ int bus_exec_context_set_transient_property(
else if (free_and_strdup(&c->group, gg) < 0)
return -ENOMEM;
- unit_write_drop_in_private_format(u, mode, name, "Group=%s\n", gg);
+ unit_write_drop_in_private_format(u, mode, name, "Group=%s", gg);
}
return 1;
@@ -879,7 +879,7 @@ int bus_exec_context_set_transient_property(
else if (free_and_strdup(&c->syslog_identifier, id) < 0)
return -ENOMEM;
- unit_write_drop_in_private_format(u, mode, name, "SyslogIdentifier=%s\n", id);
+ unit_write_drop_in_private_format(u, mode, name, "SyslogIdentifier=%s", id);
}
return 1;
@@ -895,7 +895,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->syslog_priority = (c->syslog_priority & LOG_FACMASK) | level;
- unit_write_drop_in_private_format(u, mode, name, "SyslogLevel=%i\n", level);
+ unit_write_drop_in_private_format(u, mode, name, "SyslogLevel=%i", level);
}
return 1;
@@ -911,7 +911,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->syslog_priority = (facility << 3) | LOG_PRI(c->syslog_priority);
- unit_write_drop_in_private_format(u, mode, name, "SyslogFacility=%i\n", facility);
+ unit_write_drop_in_private_format(u, mode, name, "SyslogFacility=%i", facility);
}
return 1;
@@ -927,7 +927,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->nice = n;
- unit_write_drop_in_private_format(u, mode, name, "Nice=%i\n", n);
+ unit_write_drop_in_private_format(u, mode, name, "Nice=%i", n);
}
return 1;
@@ -952,7 +952,7 @@ int bus_exec_context_set_transient_property(
if (r < 0)
return r;
- unit_write_drop_in_private_format(u, mode, name, "%s=%s\n", name, s);
+ unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, s);
}
return 1;
@@ -987,7 +987,7 @@ int bus_exec_context_set_transient_property(
}
c->working_directory_missing_ok = missing_ok;
- unit_write_drop_in_private_format(u, mode, name, "WorkingDirectory=%s%s\n", missing_ok ? "-" : "", s);
+ unit_write_drop_in_private_format(u, mode, name, "WorkingDirectory=%s%s", missing_ok ? "-" : "", s);
}
return 1;
@@ -1007,7 +1007,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->std_input = p;
- unit_write_drop_in_private_format(u, mode, name, "StandardInput=%s\n", exec_input_to_string(p));
+ unit_write_drop_in_private_format(u, mode, name, "StandardInput=%s", exec_input_to_string(p));
}
return 1;
@@ -1028,7 +1028,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->std_output = p;
- unit_write_drop_in_private_format(u, mode, name, "StandardOutput=%s\n", exec_output_to_string(p));
+ unit_write_drop_in_private_format(u, mode, name, "StandardOutput=%s", exec_output_to_string(p));
}
return 1;
@@ -1048,7 +1048,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->std_error = p;
- unit_write_drop_in_private_format(u, mode, name, "StandardError=%s\n", exec_output_to_string(p));
+ unit_write_drop_in_private_format(u, mode, name, "StandardError=%s", exec_output_to_string(p));
}
return 1;
@@ -1081,7 +1081,7 @@ int bus_exec_context_set_transient_property(
else if (streq(name, "SyslogLevelPrefix"))
c->syslog_level_prefix = b;
- unit_write_drop_in_private_format(u, mode, name, "%s=%s\n", name, yes_no(b));
+ unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, yes_no(b));
}
return 1;
@@ -1099,7 +1099,7 @@ int bus_exec_context_set_transient_property(
else if (free_and_strdup(&c->utmp_id, id) < 0)
return -ENOMEM;
- unit_write_drop_in_private_format(u, mode, name, "UtmpIdentifier=%s\n", strempty(id));
+ unit_write_drop_in_private_format(u, mode, name, "UtmpIdentifier=%s", strempty(id));
}
return 1;
@@ -1119,7 +1119,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->utmp_mode = m;
- unit_write_drop_in_private_format(u, mode, name, "UtmpMode=%s\n", exec_utmp_mode_to_string(m));
+ unit_write_drop_in_private_format(u, mode, name, "UtmpMode=%s", exec_utmp_mode_to_string(m));
}
return 1;
@@ -1137,7 +1137,7 @@ int bus_exec_context_set_transient_property(
else if (free_and_strdup(&c->pam_name, n) < 0)
return -ENOMEM;
- unit_write_drop_in_private_format(u, mode, name, "PAMName=%s\n", strempty(n));
+ unit_write_drop_in_private_format(u, mode, name, "PAMName=%s", strempty(n));
}
return 1;
@@ -1159,7 +1159,7 @@ int bus_exec_context_set_transient_property(
if (strv_length(l) == 0) {
c->environment = strv_free(c->environment);
- unit_write_drop_in_private_format(u, mode, name, "Environment=\n");
+ unit_write_drop_in_private_format(u, mode, name, "Environment=");
} else {
e = strv_env_merge(2, c->environment, l);
if (!e)
@@ -1172,7 +1172,7 @@ int bus_exec_context_set_transient_property(
if (!joined)
return -ENOMEM;
- unit_write_drop_in_private_format(u, mode, name, "Environment=%s\n", joined);
+ unit_write_drop_in_private_format(u, mode, name, "Environment=%s", joined);
}
}
@@ -1188,7 +1188,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->timer_slack_nsec = n;
- unit_write_drop_in_private_format(u, mode, name, "TimerSlackNSec=" NSEC_FMT "\n", n);
+ unit_write_drop_in_private_format(u, mode, name, "TimerSlackNSec=" NSEC_FMT, n);
}
return 1;
@@ -1206,7 +1206,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->oom_score_adjust = oa;
c->oom_score_adjust_set = true;
- unit_write_drop_in_private_format(u, mode, name, "OOMScoreAdjust=%i\n", oa);
+ unit_write_drop_in_private_format(u, mode, name, "OOMScoreAdjust=%i", oa);
}
return 1;
@@ -1228,7 +1228,7 @@ int bus_exec_context_set_transient_property(
return -ENOMEM;
STRV_FOREACH(i, c->environment_files)
- fprintf(f, "EnvironmentFile=%s\n", *i);
+ fprintf(f, "EnvironmentFile=%s", *i);
while ((r = sd_bus_message_enter_container(message, 'r', "sb")) > 0) {
const char *path;
@@ -1252,7 +1252,7 @@ int bus_exec_context_set_transient_property(
if (!buf)
return -ENOMEM;
- fprintf(f, "EnvironmentFile=%s\n", buf);
+ fprintf(f, "EnvironmentFile=%s", buf);
r = strv_consume(&l, buf);
if (r < 0)
@@ -1273,7 +1273,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
if (strv_isempty(l)) {
c->environment_files = strv_free(c->environment_files);
- unit_write_drop_in_private(u, mode, name, "EnvironmentFile=\n");
+ unit_write_drop_in_private(u, mode, name, "EnvironmentFile=");
} else {
r = strv_extend_strv(&c->environment_files, l, true);
if (r < 0)
@@ -1299,7 +1299,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
if (strv_isempty(l)) {
c->pass_environment = strv_free(c->pass_environment);
- unit_write_drop_in_private_format(u, mode, name, "PassEnvironment=\n");
+ unit_write_drop_in_private_format(u, mode, name, "PassEnvironment=");
} else {
_cleanup_free_ char *joined = NULL;
@@ -1311,7 +1311,7 @@ int bus_exec_context_set_transient_property(
if (!joined)
return -ENOMEM;
- unit_write_drop_in_private_format(u, mode, name, "PassEnvironment=%s\n", joined);
+ unit_write_drop_in_private_format(u, mode, name, "PassEnvironment=%s", joined);
}
}
@@ -1349,7 +1349,7 @@ int bus_exec_context_set_transient_property(
if (strv_length(l) == 0) {
*dirs = strv_free(*dirs);
- unit_write_drop_in_private_format(u, mode, name, "%s=\n", name);
+ unit_write_drop_in_private_format(u, mode, name, "%s=", name);
} else {
r = strv_extend_strv(dirs, l, true);
@@ -1360,7 +1360,7 @@ int bus_exec_context_set_transient_property(
if (!joined)
return -ENOMEM;
- unit_write_drop_in_private_format(u, mode, name, "%s=%s\n", name, joined);
+ unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, joined);
}
}
@@ -1388,7 +1388,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->protect_system = ps;
- unit_write_drop_in_private_format(u, mode, name, "%s=%s\n", name, s);
+ unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, s);
}
return 1;
@@ -1414,7 +1414,7 @@ int bus_exec_context_set_transient_property(
if (mode != UNIT_CHECK) {
c->protect_home = ph;
- unit_write_drop_in_private_format(u, mode, name, "%s=%s\n", name, s);
+ unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, s);
}
return 1;
@@ -1437,7 +1437,7 @@ int bus_exec_context_set_transient_property(
if (strv_isempty(l)) {
c->runtime_directory = strv_free(c->runtime_directory);
- unit_write_drop_in_private_format(u, mode, name, "%s=\n", name);
+ unit_write_drop_in_private_format(u, mode, name, "%s=", name);
} else {
r = strv_extend_strv(&c->runtime_directory, l, true);
@@ -1448,7 +1448,7 @@ int bus_exec_context_set_transient_property(
if (!joined)
return -ENOMEM;
- unit_write_drop_in_private_format(u, mode, name, "%s=%s\n", name, joined);
+ unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, joined);
}
}
@@ -1467,7 +1467,7 @@ int bus_exec_context_set_transient_property(
else if (free_and_strdup(&c->selinux_context, s) < 0)
return -ENOMEM;
- unit_write_drop_in_private_format(u, mode, name, "%s=%s\n", name, strempty(s));
+ unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, strempty(s));
}
return 1;
@@ -1535,7 +1535,7 @@ int bus_exec_context_set_transient_property(
return -ENOMEM;
}
- unit_write_drop_in_private_format(u, mode, name, "%s=%s\n", name, f);
+ unit_write_drop_in_private_format(u, mode, name, "%s=%s", name, f);
}
return 1;