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/mount/mount-tool.c | |
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/mount/mount-tool.c')
-rw-r--r-- | src/mount/mount-tool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index 5cb1cd5526..5f5d84bb97 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -10,7 +10,7 @@ #include "bus-locator.h" #include "bus-unit-util.h" #include "bus-wait-for-jobs.h" -#include "chase-symlinks.h" +#include "chase.h" #include "device-util.h" #include "dirent-util.h" #include "escape.h" @@ -384,7 +384,7 @@ static int parse_argv(int argc, char *argv[]) { if (!u) return log_oom(); - r = chase_symlinks(u, NULL, 0, &arg_mount_what, NULL); + r = chase(u, NULL, 0, &arg_mount_what, NULL); if (r < 0) return log_error_errno(r, "Failed to make path %s absolute: %m", u); } else { @@ -401,7 +401,7 @@ static int parse_argv(int argc, char *argv[]) { if (argc > optind+1) { if (arg_transport == BUS_TRANSPORT_LOCAL) { - r = chase_symlinks(argv[optind+1], NULL, CHASE_NONEXISTENT, &arg_mount_where, NULL); + r = chase(argv[optind+1], NULL, CHASE_NONEXISTENT, &arg_mount_where, NULL); if (r < 0) return log_error_errno(r, "Failed to make path %s absolute: %m", argv[optind+1]); } else { @@ -1010,7 +1010,7 @@ static int action_umount( if (!u) return log_oom(); - r = chase_symlinks(u, NULL, 0, &p, NULL); + r = chase(u, NULL, 0, &p, NULL); if (r < 0) { r2 = log_error_errno(r, "Failed to make path %s absolute: %m", argv[i]); continue; |