summaryrefslogtreecommitdiff
path: root/src/shared/strv.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-05 18:57:21 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-05 19:03:10 +0100
commit4de33e7f3238a6fe616e61139ab87e221572e5e5 (patch)
tree14970ba5ecce65e9003e0e9d77d1ef53a337b77d /src/shared/strv.c
parent69629de9c820dd41fffb1bf9b69d6d5b319c19c9 (diff)
systemd-run: make sure --nice=, --uid=, --gid=, --setenv= also work in --scope mode
Diffstat (limited to 'src/shared/strv.c')
-rw-r--r--src/shared/strv.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/shared/strv.c b/src/shared/strv.c
index 67706dc381..1ef0b26a25 100644
--- a/src/shared/strv.c
+++ b/src/shared/strv.c
@@ -527,3 +527,18 @@ void strv_print(char **l) {
STRV_FOREACH(s, l)
puts(*s);
}
+
+int strv_extendf(char ***l, const char *format, ...) {
+ va_list ap;
+ char *x;
+ int r;
+
+ va_start(ap, format);
+ r = vasprintf(&x, format, ap);
+ va_end(ap);
+
+ if (r < 0)
+ return -ENOMEM;
+
+ return strv_consume(l, x);
+}