diff options
author | Karel Zak | 2012-01-25 17:14:24 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-25 17:14:24 +0100 |
commit | 5810d870970709684cee1219f3459b5cc3fc9915 (patch) | |
tree | 4dcebb6acbde599b8447c65a0ceefb87d9f92ee9 /libmount/src/optmap.c | |
parent | blkid: move cache to /run on new systems (diff) | |
download | kernel-qcow2-util-linux-5810d870970709684cee1219f3459b5cc3fc9915.tar.gz kernel-qcow2-util-linux-5810d870970709684cee1219f3459b5cc3fc9915.tar.xz kernel-qcow2-util-linux-5810d870970709684cee1219f3459b5cc3fc9915.zip |
libmount: don't pass comments=/x-* to mount.<type> helpers
This patch add a new flag MNT_NOHLPS for mount options map, options
with this flag will not be passed to /sbin/mount.<type> helpers.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/optmap.c')
-rw-r--r-- | libmount/src/optmap.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/libmount/src/optmap.c b/libmount/src/optmap.c index 7bd4da736..4f11ce598 100644 --- a/libmount/src/optmap.c +++ b/libmount/src/optmap.c @@ -117,15 +117,13 @@ static const struct libmnt_optmap linux_flags_map[] = /* * userspace mount option (built-in MNT_USERSPACE_MAP) - * - * TODO: offset=, sizelimit=, encryption=, vfs= */ static const struct libmnt_optmap userspace_opts_map[] = { { "defaults", 0, 0 }, /* default options */ - { "auto", MNT_MS_NOAUTO, MNT_INVERT | MNT_NOMTAB }, /* Can be mounted using -a */ - { "noauto", MNT_MS_NOAUTO, MNT_NOMTAB }, /* Can only be mounted explicitly */ + { "auto", MNT_MS_NOAUTO, MNT_NOHLPS | MNT_INVERT | MNT_NOMTAB }, /* Can be mounted using -a */ + { "noauto", MNT_MS_NOAUTO, MNT_NOHLPS | MNT_NOMTAB }, /* Can only be mounted explicitly */ { "user[=]", MNT_MS_USER }, /* Allow ordinary user to mount (mtab) */ { "nouser", MNT_MS_USER, MNT_INVERT | MNT_NOMTAB }, /* Forbid ordinary user to mount */ @@ -141,19 +139,19 @@ static const struct libmnt_optmap userspace_opts_map[] = { "_netdev", MNT_MS_NETDEV }, /* Device requires network */ - { "comment=", MNT_MS_COMMENT, MNT_NOMTAB }, /* fstab comment only */ - { "x-", MNT_MS_XCOMMENT, MNT_NOMTAB | MNT_PREFIX }, /* x- options */ + { "comment=", MNT_MS_COMMENT, MNT_NOHLPS | MNT_NOMTAB },/* fstab comment only */ + { "x-", MNT_MS_XCOMMENT, MNT_NOHLPS | MNT_NOMTAB | MNT_PREFIX }, /* x- options */ - { "loop[=]", MNT_MS_LOOP }, /* use the loop device */ - { "offset=", MNT_MS_OFFSET, MNT_NOMTAB }, /* loop device offset */ - { "sizelimit=", MNT_MS_SIZELIMIT, MNT_NOMTAB }, /* loop device size limit */ - { "encryption=", MNT_MS_ENCRYPTION, MNT_NOMTAB }, /* loop device encryption */ + { "loop[=]", MNT_MS_LOOP, MNT_NOHLPS }, /* use the loop device */ + { "offset=", MNT_MS_OFFSET, MNT_NOHLPS | MNT_NOMTAB }, /* loop device offset */ + { "sizelimit=", MNT_MS_SIZELIMIT, MNT_NOHLPS | MNT_NOMTAB }, /* loop device size limit */ + { "encryption=", MNT_MS_ENCRYPTION, MNT_NOHLPS | MNT_NOMTAB }, /* loop device encryption */ { "nofail", MNT_MS_NOFAIL, MNT_NOMTAB }, /* Do not fail if ENOENT on dev */ { "uhelper=", MNT_MS_UHELPER }, /* /sbin/umount.<helper> */ - { "helper=", MNT_MS_HELPER }, /* /sbin/umount.<helper> */ + { "helper=", MNT_MS_HELPER }, /* /sbin/mount.<helper> */ { NULL, 0, 0 } }; |