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.
This commit is contained in:
Lennart Poettering
2013-01-11 01:04:11 +01:00
parent 8afbb8e118
commit 5926cccae2
3 changed files with 57 additions and 28 deletions
+15
View File
@@ -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;
+1
View File
@@ -37,6 +37,7 @@ unsigned strv_length(char **l);
char **strv_merge(char **a, char **b);
char **strv_merge_concat(char **a, char **b, const char *suffix);
char **strv_append(char **l, const char *s);
int strv_extend(char ***l, const char *value);
char **strv_remove(char **l, const char *s);
char **strv_remove_prefix(char **l, const char *s);