Date: 29 Oct 2001 13:35:37 -0000 From: Guy Antony Halse <guy@rucus.ru.ac.za> To: FreeBSD-gnats-submit@freebsd.org Cc: guy@rucus.ru.ac.za Subject: bin/31588: change request to allow mount(1) to set the MNT_IGNORE flag Message-ID: <20011029133537.73449.qmail@rucus.ru.ac.za>
next in thread | raw e-mail | index | archive | help
>Number: 31588 >Category: bin >Synopsis: change request to allow mount(1) to set the MNT_IGNORE flag >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Oct 29 05:40:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Guy Antony Halse >Release: FreeBSD 4.4-RELEASE i386 >Organization: Rhodes University Computer Users' Society >Environment: System: FreeBSD rucus.ru.ac.za 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Sun Oct 28 00:41:09 SAST 2001 drs@rucus.ru.ac.za:/usr/build/src/sys/compile/RUCUS i386 >Description: sys/mount.h contains a MNT_IGNORE flag that is used by df(1) to indicate that the filesystem should not be displayed in df's standard output. Currently this option is only used by the automounter utilities to prevent automounted volumes appearing in df's output. vn(4) vnodes allow us to mount, for example, ISO images. As a result of this, df's output can get cluttered, sometimes to a point where it isn't really readable. It would be useful, therefore, for mount(8) to be able to set the MNT_IGNORE flag on mounted filesystems and thus selectively remove them from df's output. This facility does not exist at present, and so the Fix: section contains a patch to the mount source code to allow for it. It introduces an 'ignore' option to mount, which toggles the MNT_IGNORE flag. >How-To-Repeat: The patch is relative to /usr/src/sbin >Fix: --- mount/mount.c.orig Mon Oct 1 16:08:49 2001 +++ mount/mount.c Mon Oct 29 15:06:12 2001 @@ -107,6 +107,7 @@ { MNT_NOCLUSTERW, "noclusterw" }, { MNT_SUIDDIR, "suiddir" }, { MNT_SOFTDEP, "soft-updates" }, + { MNT_IGNORE, "ignore" }, { 0, NULL } }; --- mount/mntopts.h.orig Sat Oct 9 13:54:07 1999 +++ mount/mntopts.h Mon Oct 29 15:06:54 2001 @@ -56,6 +56,7 @@ #define MOPT_NOCLUSTERR { "clusterr", 1, MNT_NOCLUSTERR, 0 } #define MOPT_NOCLUSTERW { "clusterw", 1, MNT_NOCLUSTERW, 0 } #define MOPT_SUIDDIR { "suiddir", 0, MNT_SUIDDIR, 0 } +#define MOPT_IGNORE { "ignore", 0, MNT_IGNORE, 0 } /* Control flags. */ #define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } @@ -85,7 +86,8 @@ MOPT_RDONLY, \ MOPT_UNION, \ MOPT_NOCLUSTERR, \ - MOPT_NOCLUSTERW + MOPT_NOCLUSTERW, \ + MOPT_IGNORE void getmntopts __P((const char *, const struct mntopt *, int *, int *)); void rmslashes __P((char *, char *)); --- mount/mount.8.orig Mon Oct 1 16:08:49 2001 +++ mount/mount.8 Mon Oct 29 15:15:53 2001 @@ -135,6 +135,14 @@ flag, this is the same as specifying all the options listed in the .Xr fstab 5 file for the filesystem. +.It Cm ignore +This sets the MNT_IGNORE flag, which stops +.Xr df 1 +from displaying information on the filesystem unless +.Xr df 1 +is called with the +.Fl a +option. .It Cm noasync Metadata I/O should be done synchronously, while data I/O should be done asynchronously. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011029133537.73449.qmail>