summaryrefslogtreecommitdiffstats
path: root/sbin/mount
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2009-09-14 21:08:22 +0000
committerpjd <pjd@FreeBSD.org>2009-09-14 21:08:22 +0000
commit22f6c80f945e140f85edeba0cd1cda5926cf6e4c (patch)
tree6d2a52ca2887db7f329b83490a7f62f1000b9d6b /sbin/mount
parent403f1dccfc9bbfa9926906210e82cbad7c64d5a4 (diff)
downloadFreeBSD-src-22f6c80f945e140f85edeba0cd1cda5926cf6e4c.zip
FreeBSD-src-22f6c80f945e140f85edeba0cd1cda5926cf6e4c.tar.gz
Modify mount(8) to skip MNT_IGNORE file systems by default, just like df(1)
does. This is not POLA violation, because there is no single file system in the base that use MNT_IGNORE currently, although ZFS snapshots will be mounted with MNT_IGNORE after next commit. Reviewed by: kib MFC after: 3 days
Diffstat (limited to 'sbin/mount')
-rw-r--r--sbin/mount/mount.86
-rw-r--r--sbin/mount/mount.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8
index 7635d74..104b248 100644
--- a/sbin/mount/mount.8
+++ b/sbin/mount/mount.8
@@ -469,6 +469,12 @@ or
option.
.It Fl v
Verbose mode.
+If the
+.Fl v
+is used alone, show all file systems, including those that were mounted with the
+.Dv MNT_IGNORE
+flag and show additional information about each file system (including fsid
+when run by root).
.It Fl w
The file system object is to be read and write.
.El
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 40a3e96..0bd5533 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -348,6 +348,9 @@ main(int argc, char *argv[])
if (checkvfsname(mntbuf[i].f_fstypename,
vfslist))
continue;
+ if (!verbose &&
+ (mntbuf[i].f_flags & MNT_IGNORE) != 0)
+ continue;
prmount(&mntbuf[i]);
}
}
OpenPOWER on IntegriCloud