summaryrefslogtreecommitdiff
path: root/src/shared/bus-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-11-16 21:16:13 -0500
committerGitHub <noreply@github.com>2016-11-16 21:16:13 -0500
commit4a58145f0f06970cc93377e034a9e27b3c0283ad (patch)
tree5917ecbde63fb2082ff78d85ed73a227b0fdeb5f /src/shared/bus-util.c
parentc4027307a29c6e234fd4f05b212b45ef72a47072 (diff)
parent7d992a6ede8034a36699c25c19f03e95476eedac (diff)
Merge pull request #4678 from poettering/gc-device
Automatically GC device jobs when there's no need to keep them in the job queue anymore. Implement systemctl list-jobs --before/--after. Allow systemd-run -p After/Before/Wants/Requires= ...
Diffstat (limited to 'src/shared/bus-util.c')
-rw-r--r--src/shared/bus-util.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index e7b1b1cb20..6aebe18fc0 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -1583,3 +1583,22 @@ int bus_property_get_rlimit(
return sd_bus_message_append(reply, "t", u);
}
+
+int bus_track_add_name_many(sd_bus_track *t, char **l) {
+ int r = 0;
+ char **i;
+
+ assert(t);
+
+ /* Continues adding after failure, and returns the first failure. */
+
+ STRV_FOREACH(i, l) {
+ int k;
+
+ k = sd_bus_track_add_name(t, *i);
+ if (k < 0 && r >= 0)
+ r = k;
+ }
+
+ return r;
+}