]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: use MS_SILENT for /{proc,etc}/filesystems
authorKarel Zak <kzak@redhat.com>
Thu, 9 May 2013 07:22:50 +0000 (09:22 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 9 May 2013 07:25:31 +0000 (09:25 +0200)
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>
libmount/src/context_mount.c
sys-utils/mount.8

index d28736126d350a955956f0130af5ea610204ea0f..d6691eb6ada6f158034ae810a9ebdbdc5128eb75 100644 (file)
@@ -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, "
index 078b6ed4e17b3c4841b06a00ac533963480134d1..3ffdb24373087e059c7d84634359095253c26756 100644 (file)
@@ -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