X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fconf-files.c;h=db4937db8898f341cfeff1094cd1d0c5925b581f;hb=95eb099fa8a90212ed2aef82bad360f147bc19c2;hp=c72a099b5a1bb5b6805e2f11f651bab3ab1786e5;hpb=e1d758033dc7e101ab32323a0f1649d8daf56a22;p=elogind.git diff --git a/src/shared/conf-files.c b/src/shared/conf-files.c index c72a099b5..db4937db8 100644 --- a/src/shared/conf-files.c +++ b/src/shared/conf-files.c @@ -44,7 +44,7 @@ static int files_add(Hashmap *h, const char *root, const char *path, const char assert(path); assert(suffix); - dirpath = strappenda(root ? root : "", path); + dirpath = strjoina(root ? root : "", path); dir = opendir(dirpath); if (!dir) { @@ -109,7 +109,7 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const if (!path_strv_resolve_uniq(dirs, root)) return -ENOMEM; - fh = hashmap_new(string_hash_func, string_compare_func); + fh = hashmap_new(&string_hash_ops); if (!fh) return -ENOMEM; @@ -118,8 +118,8 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const if (r == -ENOMEM) { return r; } else if (r < 0) - log_debug("Failed to search for files in %s: %s", - *p, strerror(-r)); + log_debug_errno(r, "Failed to search for files in %s: %m", + *p); } files = hashmap_get_strv(fh);