diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-06-25 12:39:55 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-07-01 15:45:15 +0200 |
commit | 6fba9a28b99dd6d12c12eaa3c84c3f8a1e54e4b0 (patch) | |
tree | 164b5a01b042ac97bb7a429b095e02a4e138ff3c /src/basic/mountpoint-util.c | |
parent | mountpoint-util: add public helper for comparing file handles (diff) | |
download | systemd-6fba9a28b99dd6d12c12eaa3c84c3f8a1e54e4b0.tar.xz systemd-6fba9a28b99dd6d12c12eaa3c84c3f8a1e54e4b0.zip |
mountpoint-util: use ERRNO_IS_xyz() at more places
Diffstat (limited to 'src/basic/mountpoint-util.c')
-rw-r--r-- | src/basic/mountpoint-util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c index 31a077fbdf..4aecd109d3 100644 --- a/src/basic/mountpoint-util.c +++ b/src/basic/mountpoint-util.c @@ -254,7 +254,7 @@ int fd_is_mount_point(int fd, const char *filename, int flags) { if (r < 0) { if (is_name_to_handle_at_fatal_error(r)) return r; - if (r != -EOPNOTSUPP) + if (!ERRNO_IS_NOT_SUPPORTED(r)) goto fallback_fdinfo; /* This kernel or file system does not support name_to_handle_at(), hence let's see @@ -270,7 +270,7 @@ int fd_is_mount_point(int fd, const char *filename, int flags) { if (r < 0) { if (is_name_to_handle_at_fatal_error(r)) return r; - if (r != -EOPNOTSUPP) + if (!ERRNO_IS_NOT_SUPPORTED(r)) goto fallback_fdinfo; if (nosupp) /* Both the parent and the directory can't do name_to_handle_at() */ @@ -295,7 +295,7 @@ int fd_is_mount_point(int fd, const char *filename, int flags) { fallback_fdinfo: r = fd_fdinfo_mnt_id(fd, filename, flags, &mount_id); - if (IN_SET(r, -EOPNOTSUPP, -EACCES, -EPERM, -ENOSYS)) + if (ERRNO_IS_NEG_NOT_SUPPORTED(r) || ERRNO_IS_NEG_PRIVILEGE(r)) goto fallback_fstat; if (r < 0) return r; |