From 715f1dae55635716b71daddf23fca8081aa08254 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 9 May 2013 09:22:50 +0200 Subject: [PATCH] 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 Signed-off-by: Karel Zak --- libmount/src/context_mount.c | 4 +++- sys-utils/mount.8 | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index d28736126d..d6691eb6ad 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, " diff --git a/sys-utils/mount.8 b/sys-utils/mount.8 index 626d861691..a3a6582979 100644 --- a/sys-utils/mount.8 +++ b/sys-utils/mount.8 @@ -760,7 +760,8 @@ If .I /etc/filesystems ends in a line with a single * only, mount will read .I /proc/filesystems -afterwards. +afterwards. All of the filesystem types will be +mounted with mount option "silent". The .B auto -- 2.47.2