summaryrefslogtreecommitdiff
path: root/src/hashmap.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-04-25 20:41:47 +0200
committerKay Sievers <kay.sievers@vrfy.org>2011-04-25 20:41:47 +0200
commitdb1413d7380acacc4e50faf801ca0d401da89764 (patch)
tree5525908e3b419149c0458348210fedf37eafc703 /src/hashmap.c
parent3a90ae048233021833ae828c1fc6bf0eeab46197 (diff)
sysctl.d, binfmt.d, modules-load.d: switch to stacked config dirs in /lib, /etc, /run
Diffstat (limited to 'src/hashmap.c')
-rw-r--r--src/hashmap.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/hashmap.c b/src/hashmap.c
index 4b187057ec..53502576ad 100644
--- a/src/hashmap.c
+++ b/src/hashmap.c
@@ -592,3 +592,21 @@ Hashmap *hashmap_copy(Hashmap *h) {
return copy;
}
+
+char **hashmap_get_strv(Hashmap *h) {
+ char **sv;
+ Iterator it;
+ char *path;
+ int n;
+
+ sv = malloc((h->n_entries+1) * sizeof(char *));
+ if (sv == NULL)
+ return NULL;
+
+ n = 0;
+ HASHMAP_FOREACH(path, h, it)
+ sv[n++] = path;
+ sv[n] = NULL;
+
+ return sv;
+}