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/sysupdate | |
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/sysupdate')
-rw-r--r-- | src/sysupdate/sysupdate-resource.c | 6 | ||||
-rw-r--r-- | src/sysupdate/sysupdate-transfer.c | 4 | ||||
-rw-r--r-- | src/sysupdate/sysupdate.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/sysupdate/sysupdate-resource.c b/src/sysupdate/sysupdate-resource.c index 6c05d245f8..c918de79cc 100644 --- a/src/sysupdate/sysupdate-resource.c +++ b/src/sysupdate/sysupdate-resource.c @@ -6,7 +6,7 @@ #include "alloc-util.h" #include "blockdev-util.h" -#include "chase-symlinks.h" +#include "chase.h" #include "device-util.h" #include "devnum-util.h" #include "dirent-util.h" @@ -563,7 +563,7 @@ int resource_resolve_path( _cleanup_free_ char *resolved = NULL; struct stat st; - r = chase_symlinks(rr->path, root, CHASE_PREFIX_ROOT, &resolved, &fd); + r = chase(rr->path, root, CHASE_PREFIX_ROOT, &resolved, &fd); if (r < 0) return log_error_errno(r, "Failed to resolve '%s': %m", rr->path); @@ -599,7 +599,7 @@ int resource_resolve_path( } else if (RESOURCE_IS_FILESYSTEM(rr->type) && root) { _cleanup_free_ char *resolved = NULL; - r = chase_symlinks(rr->path, root, CHASE_PREFIX_ROOT, &resolved, NULL); + r = chase(rr->path, root, CHASE_PREFIX_ROOT, &resolved, NULL); if (r < 0) return log_error_errno(r, "Failed to resolve '%s': %m", rr->path); diff --git a/src/sysupdate/sysupdate-transfer.c b/src/sysupdate/sysupdate-transfer.c index 0c3d65a00d..6789f48967 100644 --- a/src/sysupdate/sysupdate-transfer.c +++ b/src/sysupdate/sysupdate-transfer.c @@ -4,7 +4,7 @@ #include "alloc-util.h" #include "blockdev-util.h" -#include "chase-symlinks.h" +#include "chase.h" #include "conf-parser.h" #include "dirent-util.h" #include "fd-util.h" @@ -1211,7 +1211,7 @@ int transfer_install_instance( assert_not_reached(); if (resolve_link_path && root) { - r = chase_symlinks(link_path, root, CHASE_PREFIX_ROOT|CHASE_NONEXISTENT, &resolved, NULL); + r = chase(link_path, root, CHASE_PREFIX_ROOT|CHASE_NONEXISTENT, &resolved, NULL); if (r < 0) return log_error_errno(r, "Failed to resolve current symlink path '%s': %m", link_path); diff --git a/src/sysupdate/sysupdate.c b/src/sysupdate/sysupdate.c index 4ad901e080..6cb09dae50 100644 --- a/src/sysupdate/sysupdate.c +++ b/src/sysupdate/sysupdate.c @@ -6,7 +6,7 @@ #include "build.h" #include "bus-error.h" #include "bus-locator.h" -#include "chase-symlinks.h" +#include "chase.h" #include "conf-files.h" #include "constants.h" #include "dirent-util.h" @@ -1106,7 +1106,7 @@ static int verb_components(int argc, char **argv, void *userdata) { _cleanup_closedir_ DIR *d = NULL; _cleanup_free_ char *p = NULL; - r = chase_symlinks_and_opendir(*i, arg_root, CHASE_PREFIX_ROOT, &p, &d); + r = chase_and_opendir(*i, arg_root, CHASE_PREFIX_ROOT, &p, &d); if (r == -ENOENT) continue; if (r < 0) |