From: Lennart Poettering Date: Tue, 25 Jun 2024 10:39:55 +0000 (+0200) Subject: mountpoint-util: use ERRNO_IS_xyz() at more places X-Git-Tag: v257-rc1~1003^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6fba9a28b99dd6d12c12eaa3c84c3f8a1e54e4b0;p=thirdparty%2Fsystemd.git mountpoint-util: use ERRNO_IS_xyz() at more places --- diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c index 31a077fbdf2..4aecd109d35 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;