diff options
author | Jan Synacek <jsynacek@redhat.com> | 2014-09-24 14:29:05 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-09-29 11:08:12 -0400 |
commit | 86b23b07c96b185126bfbf217227dad362a20c25 (patch) | |
tree | 897437332588d77a7f2e27d1a3dc486ecbdd562f /src/core/execute.c | |
parent | 70f1b2ddc6b94d3fa5539eb8503887b465f7fcc7 (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.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 8c9dfde00a..07ec7a28d6 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) |