From 86b23b07c96b185126bfbf217227dad362a20c25 Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Wed, 24 Sep 2014 14:29:05 +0200 Subject: swap: introduce Discard property Process possible "discard" values from /etc/fstab. --- src/core/execute.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/core/execute.c') 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) -- cgit v1.2.3