summaryrefslogtreecommitdiffstats
path: root/libmount/src/context_mount.c
diff options
context:
space:
mode:
authorKarel Zak2013-05-09 09:22:50 +0200
committerKarel Zak2013-05-09 09:25:31 +0200
commita21aa92fd4ba5b972c0ebd65e6b015131ca7c4e6 (patch)
tree9896544f344902ff9c3a2554da2706e87ab51e1a /libmount/src/context_mount.c
parentbuild-sys: use -Wno-clobbered for some BSD crap (diff)
downloadkernel-qcow2-util-linux-a21aa92fd4ba5b972c0ebd65e6b015131ca7c4e6.tar.gz
kernel-qcow2-util-linux-a21aa92fd4ba5b972c0ebd65e6b015131ca7c4e6.tar.xz
kernel-qcow2-util-linux-a21aa92fd4ba5b972c0ebd65e6b015131ca7c4e6.zip
libmount: use MS_SILENT for /{proc,etc}/filesystems
mount(8) needs to be doing silent mounts when doing this brute forcing or when the filesystem is not explicitly specified. Reported-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_mount.c')
-rw-r--r--libmount/src/context_mount.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
index d28736126..d6691eb6a 100644
--- a/libmount/src/context_mount.c
+++ b/libmount/src/context_mount.c
@@ -609,7 +609,7 @@ static int do_mount_additional(struct libmnt_context *cxt,
/*
* The default is to use fstype from cxt->fs, this could be overwritten by
- * @try_type argument.
+ * @try_type argument. If @try_type is specified then mount with MS_SILENT.
*
* Returns: 0 on success,
* >0 in case of mount(2) error (returns syscall errno),
@@ -659,6 +659,8 @@ static int do_mount(struct libmnt_context *cxt, const char *try_type)
if (!(flags & MS_MGC_MSK))
flags |= MS_MGC_VAL;
+ if (try_type)
+ flags |= MS_SILENT;
DBG(CXT, mnt_debug_h(cxt, "%smount(2) "
"[source=%s, target=%s, type=%s, "