chiark / gitweb /
bus-policy: move name list iteration to policy users
[elogind.git] / src / core / execute.c
index 8c9dfde00a11558110e36c850d470ca54047e36c..8b9bb27137c24b3cefbbbb4deca9bcae122deff6 100644 (file)
@@ -2566,6 +2566,29 @@ int exec_command_set(ExecCommand *c, const char *path, ...) {
         return 0;
 }
 
+int exec_command_append(ExecCommand *c, const char *path, ...) {
+        _cleanup_strv_free_ char **l = NULL;
+        va_list ap;
+        int r;
+
+        assert(c);
+        assert(path);
+
+        va_start(ap, path);
+        l = strv_new_ap(path, ap);
+        va_end(ap);
+
+        if (!l)
+                return -ENOMEM;
+
+        r = strv_extend_strv(&c->argv, l);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+
 static int exec_runtime_allocate(ExecRuntime **rt) {
 
         if (*rt)