diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-10 16:04:34 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-19 16:51:14 +0200 |
commit | 47a0011186757f55a747df22f05557d90990a95d (patch) | |
tree | a1e614fe2816af7d4b6177bda8ec8263b764f5ce | |
parent | f1b4b94cae25820b67c8adb3f4cada44d1a4287e (diff) | |
download | systemd-47a0011186757f55a747df22f05557d90990a95d.tar.gz |
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.
-rw-r--r-- | src/shared/dropin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/dropin.c b/src/shared/dropin.c index 88c7d98de6..4a29bd09c5 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; } |