diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-04-02 01:25:46 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-04-05 00:52:56 +0900 |
commit | e212f422796da9e626030289faf083407c8955df (patch) | |
tree | 2a428bf554c03c95503d9092c22af1465b4953ca /src/shared/find-esp.c | |
parent | 99e6d7941b70d6015c79e816f07bece947563f87 (diff) | |
download | systemd-e212f422796da9e626030289faf083407c8955df.tar.gz |
fd-util: introduce dir_fd_is_root_or_cwd()
Diffstat (limited to 'src/shared/find-esp.c')
-rw-r--r-- | src/shared/find-esp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/shared/find-esp.c b/src/shared/find-esp.c index 60f80387f8..0d45249d63 100644 --- a/src/shared/find-esp.c +++ b/src/shared/find-esp.c @@ -444,10 +444,7 @@ int find_esp_and_warn_at( assert(rfd >= 0 || rfd == AT_FDCWD); - if (rfd >= 0) - r = dir_fd_is_root(rfd); - else - r = true; + r = dir_fd_is_root_or_cwd(rfd); if (r < 0) return log_error_errno(r, "Failed to check if directory file descriptor is root: %m"); if (r == 0) |