From owner-freebsd-fs Sun Mar 25 0:37:55 2001 Delivered-To: freebsd-fs@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id A6AEE37B719 for ; Sun, 25 Mar 2001 00:37:50 -0800 (PST) (envelope-from roam@orbitel.bg) Received: (qmail 59771 invoked by uid 1000); 25 Mar 2001 08:36:51 -0000 Date: Sun, 25 Mar 2001 11:36:50 +0300 From: Peter Pentchev To: Bruce Evans Cc: Dima Dorfman , Gerald Pfeifer , freebsd-hackers@FreeBSD.ORG, freebsd-fs@FreeBSD.ORG Subject: Re: Displaying options for current NFS mounts Message-ID: <20010325113649.D36335@ringworld.oblivion.bg> Mail-Followup-To: Bruce Evans , Dima Dorfman , Gerald Pfeifer , freebsd-hackers@FreeBSD.ORG, freebsd-fs@FreeBSD.ORG References: <20010324221539.A025A3E09@bazooka.unixfreak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from bde@zeta.org.au on Sun, Mar 25, 2001 at 02:18:43PM +1000 Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, Mar 25, 2001 at 02:18:43PM +1000, Bruce Evans wrote: > On Sat, 24 Mar 2001, Dima Dorfman wrote: > > > I tried to export this stuff in struct statfs, but ran into a problem: > > I'd need the complete definitions of _args in , but I > > can't include, e.g., because the latter includes the > > former ()! > > mount.h used to know too much about all sorts of filesystems, but this > was fixed in 4.4BSD. It is impossible for mount.h or mount(8) to know > about all file systems, since filesystems can be dynamically loaded, > and ugly for it to know about more than 1 (or 0 -- ffs is too special). > > > The patch below kind of implements this functionality. I only export > > nfs_args (not _args), and I only modified mount(8) to print > > the NFS version, but printing the transport and others is simple from > > there. To work around the above problem, I pasted the struct nfs_args > > definition into mount.h. It is *horribly* ugly, but it does work. > > Only mount_foofs can reasonably know about the options for foofs. > perhaps mount(8) could fork-exec mount_foofs(8) to print options for > foofs. Or could mount(8) invoke a couple of sysctl's to get a string representation of each mountpoint's mount options? G'luck, Peter -- I am the thought you are now thinking. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message