diff --git a/sbin/mount/mntopts.h b/sbin/mount/mntopts.h --- a/sbin/mount/mntopts.h +++ b/sbin/mount/mntopts.h @@ -58,6 +58,7 @@ #define MOPT_NFS4ACLS { "nfsv4acls", 0, MNT_NFS4ACLS, 0 } #define MOPT_AUTOMOUNTED { "automounted",0, MNT_AUTOMOUNTED, 0 } #define MOPT_UNTRUSTED { "untrusted", 0, MNT_UNTRUSTED, 0 } +#define MOPT_IGNORE { "ignore", 0, MNT_IGNORE, 0 } /* Control flags. */ #define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 --- a/sbin/mount/mount.8 +++ b/sbin/mount/mount.8 @@ -375,6 +375,11 @@ This option is intended to be used when mounting file systems from untrusted media such as USB memory sticks or other externally-provided media. +.It Cm ignore +Information about the filesystem is not displayed by default by +.Xr df 1 +and +.Nm . .El .Pp Any additional options specific to a file system type that is not diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -972,6 +972,12 @@ } else if (strcmp(opt->name, "noemptydir") == 0) { fsflags &= ~MNT_EMPTYDIR; do_freeopt = 1; + } else if (strcmp(opt->name, "ignore") == 0) { + fsflags |= MNT_IGNORE; + do_freeopt = 1; + } else if (strcmp(opt->name, "noignore") == 0) { + fsflags &= ~MNT_IGNORE; + do_freeopt = 1; } if (do_freeopt) vfs_freeopt(optlist, opt); diff --git a/sys/sys/mount.h b/sys/sys/mount.h --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -362,6 +362,7 @@ { MNT_RELOAD, "reload" }, \ { MNT_FORCE, "force" }, \ { MNT_SNAPSHOT, "snapshot" }, \ + { MNT_IGNORE, "ignore" }, \ { 0, NULL } #endif