diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-03-21 21:17:22 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-03-24 13:43:51 +0100 |
commit | f461a28da70320473c7466bcdc34fa601da0877b (patch) | |
tree | 8cb409e11d95129f208468588d2fc670e9d81bd4 /src/systemctl | |
parent | 0da2780c8a001e82695b261007966308be331bf3 (diff) | |
download | systemd-f461a28da70320473c7466bcdc34fa601da0877b.tar.gz |
chase-symlinks: Rename chase_symlinks() to chase()
Chasing symlinks is a core function that's used in a lot of places
so it deservers a less verbose names so let's rename it to chase()
and chaseat().
We also slightly change the pattern used for the chaseat() helpers
so we get chase_and_openat() and similar.
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl-switch-root.c | 6 | ||||
-rw-r--r-- | src/systemctl/systemctl-util.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/systemctl/systemctl-switch-root.c b/src/systemctl/systemctl-switch-root.c index 5c71d3d97f..8cfcaf8935 100644 --- a/src/systemctl/systemctl-switch-root.c +++ b/src/systemctl/systemctl-switch-root.c @@ -3,7 +3,7 @@ #include "argv-util.h" #include "bus-error.h" #include "bus-locator.h" -#include "chase-symlinks.h" +#include "chase.h" #include "parse-util.h" #include "path-util.h" #include "proc-cmdline.h" @@ -21,11 +21,11 @@ static int same_file_in_root( struct stat sta, stb; int r; - r = chase_symlinks_and_stat(a, root, CHASE_PREFIX_ROOT, NULL, &sta); + r = chase_and_stat(a, root, CHASE_PREFIX_ROOT, NULL, &sta); if (r < 0) return r; - r = chase_symlinks_and_stat(b, root, CHASE_PREFIX_ROOT, NULL, &stb); + r = chase_and_stat(b, root, CHASE_PREFIX_ROOT, NULL, &stb); if (r < 0) return r; diff --git a/src/systemctl/systemctl-util.c b/src/systemctl/systemctl-util.c index 6e87b18494..b6b28a113d 100644 --- a/src/systemctl/systemctl-util.c +++ b/src/systemctl/systemctl-util.c @@ -10,7 +10,7 @@ #include "bus-locator.h" #include "bus-map-properties.h" #include "bus-unit-util.h" -#include "chase-symlinks.h" +#include "chase.h" #include "dropin.h" #include "env-util.h" #include "exit-status.h" @@ -422,7 +422,7 @@ int unit_file_find_path(LookupPaths *lp, const char *unit_name, char **ret_unit_ if (!path) return log_oom(); - r = chase_symlinks(path, arg_root, 0, &lpath, NULL); + r = chase(path, arg_root, 0, &lpath, NULL); if (r == -ENOENT) continue; if (r == -ENOMEM) |