mountpoint-util: rename fd_is_mount_point() to is_mount_point_at()

fd_* functions in our codebase usually mean fd-specific operations,
while this one actually takes openat()-style params. Rename it
accordingly hence.
This commit is contained in:
Mike Yuan
2025-01-22 01:37:31 +01:00
parent e2f97c790e
commit 7ce2c1bb5f
12 changed files with 37 additions and 37 deletions
+2 -2
View File
@@ -744,7 +744,7 @@ static int dir_cleanup(
if (S_ISDIR(sx.stx_mode)) {
int q;
q = fd_is_mount_point(dirfd(d), de->d_name, 0);
q = is_mount_point_at(dirfd(d), de->d_name, 0);
if (q < 0)
log_debug_errno(q, "Failed to determine whether \"%s/%s\" is a mount point, ignoring: %m", p, de->d_name);
else if (q > 0) {
@@ -2687,7 +2687,7 @@ static int rm_if_wrong_type_safe(
}
/* Do not remove mount points. */
r = fd_is_mount_point(parent_fd, name, follow_links ? AT_SYMLINK_FOLLOW : 0);
r = is_mount_point_at(parent_fd, name, follow_links ? AT_SYMLINK_FOLLOW : 0);
if (r < 0)
(void) log_warning_errno(r, "Failed to check if \"%s/%s\" is a mount point: %m; continuing.",
parent_name ?: "...", name);