From: Zbigniew Jędrzejewski-Szmek Date: Wed, 10 Jul 2019 14:04:34 +0000 (+0200) Subject: shared/dropin: rename function for clarity X-Git-Tag: v243-rc1~77^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=47a0011186757f55a747df22f05557d90990a95d;p=thirdparty%2Fsystemd.git shared/dropin: rename function for clarity The caller looks for directories and is called "..._find_dirs()". Here, there is no "finding" going on, so I found the old name confusing. --- diff --git a/src/shared/dropin.c b/src/shared/dropin.c index 88c7d98de61..4a29bd09c56 100644 --- a/src/shared/dropin.c +++ b/src/shared/dropin.c @@ -93,7 +93,7 @@ int write_drop_in_format(const char *dir, const char *unit, unsigned level, return write_drop_in(dir, unit, level, name, p); } -static int unit_file_find_dir( +static int unit_file_add_dir( const char *original_root, const char *path, char ***dirs) { @@ -103,6 +103,8 @@ static int unit_file_find_dir( assert(path); + /* This adds [original_root]/path to dirs, if it exists. */ + r = chase_symlinks(path, original_root, 0, &chased); if (r == -ENOENT) /* Ignore -ENOENT, after all most units won't have a drop-in dir. */ return 0; @@ -143,7 +145,7 @@ static int unit_file_find_dirs( path = strjoina(unit_path, "/", name, suffix); if (!unit_path_cache || set_get(unit_path_cache, path)) { - r = unit_file_find_dir(original_root, path, dirs); + r = unit_file_add_dir(original_root, path, dirs); if (r < 0) return r; }