From: Karel Zak Date: Wed, 21 Sep 2022 09:03:54 +0000 (+0200) Subject: libmount: add MS_MOVE to options map X-Git-Tag: v2.39-rc1~260 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f61195c02d4c4af3a04d97542e0d83d722615675;p=thirdparty%2Futil-linux.git libmount: add MS_MOVE to options map 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 --- diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in index 5ce20d66f9..6e57efb751 100644 --- a/libmount/src/libmount.h.in +++ b/libmount/src/libmount.h.in @@ -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. helpers command line */ +#define MNT_NOFSTAB (1 << 5) /* not expected in fstab */ /** * libmnt_fs: diff --git a/libmount/src/optmap.c b/libmount/src/optmap.c index 6d0db2bf3a..b15fd7ae07 100644 --- a/libmount/src/optmap.c +++ b/libmount/src/optmap.c @@ -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 } };