From 5926cccae202f1b8869017d4bdaf9e9ce371bba6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 11 Jan 2013 01:04:11 +0100 Subject: 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. --- src/shared/strv.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/shared/strv.c') 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; -- cgit v1.2.3-54-g00ecf