summaryrefslogtreecommitdiff
path: root/src/core/execute.c
diff options
context:
space:
mode:
authorJan Synacek <jsynacek@redhat.com>2014-09-24 14:29:05 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-09-29 11:08:12 -0400
commit86b23b07c96b185126bfbf217227dad362a20c25 (patch)
tree897437332588d77a7f2e27d1a3dc486ecbdd562f /src/core/execute.c
parent70f1b2ddc6b94d3fa5539eb8503887b465f7fcc7 (diff)
swap: introduce Discard property
Process possible "discard" values from /etc/fstab.
Diffstat (limited to 'src/core/execute.c')
-rw-r--r--src/core/execute.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index 8c9dfde00..07ec7a28d 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -2566,6 +2566,31 @@ int exec_command_set(ExecCommand *c, const char *path, ...) {
return 0;
}
+int exec_command_append(ExecCommand *c, const char *path, ...) {
+ va_list ap;
+ char **l;
+ 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) {
+ strv_free(l);
+ return r;
+ }
+
+ return 0;
+}
+
+
static int exec_runtime_allocate(ExecRuntime **rt) {
if (*rt)