diff options
author | Karel Zak | 2016-12-08 14:55:02 +0100 |
---|---|---|
committer | Karel Zak | 2016-12-08 14:55:02 +0100 |
commit | 83601b1af924a666d86ad956d78e222ad222bea2 (patch) | |
tree | 72480e67259aa21f47eae6302f32323e072ec50e /libmount/src/optmap.c | |
parent | findmnt: add --tree to allow to enable tree output for --mtab (diff) | |
download | kernel-qcow2-util-linux-83601b1af924a666d86ad956d78e222ad222bea2.tar.gz kernel-qcow2-util-linux-83601b1af924a666d86ad956d78e222ad222bea2.tar.xz kernel-qcow2-util-linux-83601b1af924a666d86ad956d78e222ad222bea2.zip |
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 <kzak@redhat.com>
Diffstat (limited to 'libmount/src/optmap.c')
-rw-r--r-- | libmount/src/optmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 */ |