summaryrefslogtreecommitdiff
path: root/src/shared/strv.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-01-11 01:04:11 +0100
committerLennart Poettering <lennart@poettering.net>2013-01-11 01:04:11 +0100
commit5926cccae202f1b8869017d4bdaf9e9ce371bba6 (patch)
treeb3bd75bb7232b3a64b7e4cb67e542dc3f8b4172a /src/shared/strv.c
parent8afbb8e1180dce3cb33a14fc3ec5afcf501104e6 (diff)
unit: instead of directly loading drop-in configuration snippets use conf_files_list_strv()
This has the benefit of allowing the usual overriding/masking knowledge everybody loves so much.
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 6b76d0eaef..aed45d2612 100644
--- a/src/shared/strv.c
+++ b/src/shared/strv.c
@@ -370,6 +370,21 @@ fail:
return NULL;
}
+int strv_extend(char ***l, const char *value) {
+ char **c;
+
+ if (!value)
+ return 0;
+
+ c = strv_append(*l, value);
+ if (!c)
+ return -ENOMEM;
+
+ strv_free(*l);
+ *l = c;
+ return 0;
+}
+
char **strv_uniq(char **l) {
char **i;