]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: add missing MOUNT_ATTR_NODEV
authorKarel Zak <kzak@redhat.com>
Thu, 23 Mar 2023 11:37:18 +0000 (12:37 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Mar 2023 11:37:18 +0000 (12:37 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/mount-api-utils.h
libmount/src/optlist.c

index 69f7eb088c622a5b96ed9a5bf7df2b391d937a2a..43144221cb4846169176380f53f804dacb9c3113 100644 (file)
@@ -79,6 +79,10 @@ static inline int move_mount(int from_dfd, const char *from_pathname, int to_dfd
 # define MOUNT_ATTR_NOSUID 0x00000002
 #endif
 
+#ifndef MOUNT_ATTR_NODEV
+# define MOUNT_ATTR_NODEV 0x00000004
+#endif
+
 #ifndef MOUNT_ATTR_NOEXEC
 # define MOUNT_ATTR_NOEXEC 0x00000008
 #endif
index f1b15f7c01483e583273ae46294277416fe0e207..0fe74be5ce6be102f889f15d0e079a68ec61fb3a 100644 (file)
@@ -369,6 +369,8 @@ static inline uint64_t flag_to_attr(unsigned long flag)
                return MOUNT_ATTR_RDONLY;
        case MS_NOSUID:
                return MOUNT_ATTR_NOSUID;
+       case MS_NODEV:
+               return MOUNT_ATTR_NODEV;
        case MS_NOEXEC:
                return MOUNT_ATTR_NOEXEC;
        case MS_NODIRATIME: