From 83601b1af924a666d86ad956d78e222ad222bea2 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 8 Dec 2016 14:55:02 +0100 Subject: libmount: introduce X-* comments x-* are fstab only and not stored in userspace (utab). In some cases it's not optional solution because the option is also necessary for umount or another operations. The X-* is exactly the same as x-*, but stored to utab (or mtab on old systems). It's usually bad idea to store mount options in userspace, but it's better to provide any solution that force users to bypass mount(8) (and friends) and implement 3rd-party incompatible solutions. Signed-off-by: Karel Zak --- libmount/src/optmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libmount/src/optmap.c') diff --git a/libmount/src/optmap.c b/libmount/src/optmap.c index f827e04f5..6fdaa7a41 100644 --- a/libmount/src/optmap.c +++ b/libmount/src/optmap.c @@ -159,7 +159,9 @@ static const struct libmnt_optmap userspace_opts_map[] = { "_netdev", MNT_MS_NETDEV }, /* Device requires network */ { "comment=", MNT_MS_COMMENT, MNT_NOHLPS | MNT_NOMTAB },/* fstab comment only */ - { "x-", MNT_MS_XCOMMENT, MNT_NOHLPS | MNT_NOMTAB | MNT_PREFIX }, /* x- options */ + + { "X-", MNT_MS_XPERSIST, MNT_NOHLPS | MNT_PREFIX }, /* X- persistent comments (utab) */ + { "x-", MNT_MS_XCOMMENT, MNT_NOHLPS | MNT_NOMTAB | MNT_PREFIX }, /* x- fstab only comments */ { "loop[=]", MNT_MS_LOOP, MNT_NOHLPS }, /* use the loop device */ { "offset=", MNT_MS_OFFSET, MNT_NOHLPS | MNT_NOMTAB }, /* loop device offset */ -- cgit v1.2.3-55-g7522