]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: add MS_MOVE to options map
authorKarel Zak <kzak@redhat.com>
Wed, 21 Sep 2022 09:03:54 +0000 (11:03 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2023 11:58:42 +0000 (12:58 +0100)
libmount originally had in the options map only options that are
possible to use in fstab. Now we use the map to verify and
classify all mount options, so MS_MOVE is necessary there too.

The patch also add a new MNT_NOFSTAB option flag, not used for now.

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/libmount.h.in
libmount/src/optmap.c

index 5ce20d66f97e0c26c05262df2b51008391d1fed9..6e57efb751e783eaece856c60cc9edc3f079f8be 100644 (file)
@@ -88,6 +88,7 @@ struct libmnt_optmap
 #define MNT_NOMTAB     (1 << 2) /* skip in the mtab option string */
 #define MNT_PREFIX     (1 << 3) /* prefix used for some options (e.g. "x-foo") */
 #define MNT_NOHLPS     (1 << 4) /* don't add the option to mount.<type> helpers command line */
+#define MNT_NOFSTAB    (1 << 5) /* not expected in fstab */
 
 /**
  * libmnt_fs:
index 6d0db2bf3a7736e3350649d675d8e023c6754f20..b15fd7ae07cdf22a6b32a9b60831b8174bf27a99 100644 (file)
@@ -135,6 +135,9 @@ static const struct libmnt_optmap linux_flags_map[] =
 #ifdef MS_NOSYMFOLLOW
    { "symfollow", MS_NOSYMFOLLOW, MNT_INVERT }, /* Don't follow symlinks */
    { "nosymfollow", MS_NOSYMFOLLOW },
+#endif
+#ifdef MS_MOVE
+   { "move",   MS_MOVE,        MNT_NOHLPS | MNT_NOMTAB | MNT_NOFSTAB }, /* --move */
 #endif
    { NULL, 0, 0 }
 };