]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
smack: catch more types of 'not supported' errors
authorLennart Poettering <lennart@poettering.net>
Thu, 7 Jul 2022 22:08:22 +0000 (00:08 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 8 Jul 2022 14:09:27 +0000 (16:09 +0200)
src/shared/smack-util.c

index 0df1778cb2dcb8c4b4c71a220631852663f9008d..8f90a2096d4d36a27d1219b4e6663ac2282f96a6 100644 (file)
@@ -12,6 +12,7 @@
 #include <unistd.h>
 
 #include "alloc-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "log.h"
@@ -158,7 +159,7 @@ static int smack_fix_fd(int fd, const char *abspath, LabelFixFlags flags) {
                 r = -errno;
 
                 /* If the FS doesn't support labels, then exit without warning */
-                if (r == -EOPNOTSUPP)
+                if (ERRNO_IS_NOT_SUPPORTED(r))
                         return 0;
 
                 /* It the FS is read-only and we were told to ignore failures caused by that, suppress error */