+ r = hashmap_put(names, *i, INT_TO_PTR(2));
+ if (r < 0 && r != -EEXIST) {
+ log_error("Failed to add to hashmap: %s", strerror(-r));
+ return r;
+ }
+ }
+
+ merged = new(char*, hashmap_size(names) + 1);
+ HASHMAP_FOREACH_KEY(v, k, names, iterator)
+ merged[n++] = k;
+
+ merged[n] = NULL;
+ strv_sort(merged);
+