chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clients: unify how we invoke getopt_long()
[elogind.git]
/
src
/
core
/
dbus-service.c
diff --git
a/src/core/dbus-service.c
b/src/core/dbus-service.c
index 85b13f01ef924b93c8673d14c702b8f39e236d8c..c888570c4b9f9653c14d169d58e24ebc714425ae 100644
(file)
--- a/
src/core/dbus-service.c
+++ b/
src/core/dbus-service.c
@@
-81,7
+81,7
@@
BUS_UNIT_INTERFACES_LIST \
"org.freedesktop.systemd1.Service\0"
BUS_UNIT_INTERFACES_LIST \
"org.freedesktop.systemd1.Service\0"
-const char bus_service_interface[]
_introspect_("Service")
= BUS_SERVICE_INTERFACE;
+const char bus_service_interface[] = BUS_SERVICE_INTERFACE;
const char bus_service_invalidating_properties[] =
"ExecStartPre\0"
const char bus_service_invalidating_properties[] =
"ExecStartPre\0"
@@
-273,21
+273,16
@@
static int bus_service_set_transient_property(
fputs("ExecStart=\n", f);
LIST_FOREACH(command, c, s->exec_command[SERVICE_EXEC_START]) {
fputs("ExecStart=\n", f);
LIST_FOREACH(command, c, s->exec_command[SERVICE_EXEC_START]) {
- char **a;
- fputs("ExecStart=", f);
+ _cleanup_free_ char *a;
- if (c->ignore)
- fputc('-', f);
-
- fputc('@', f);
- fputs(c->path, f);
-
- STRV_FOREACH(a, c->argv) {
- fputc(' ', f);
- fputs(*a, f);
- }
+ a = strv_join_quoted(c->argv);
+ if (!a)
+ return -ENOMEM;
- fputc('\n', f);
+ fprintf(f, "ExecStart=%s@%s %s\n",
+ c->ignore ? "-" : "",
+ c->path,
+ a);
}
fflush(f);
}
fflush(f);