From owner-freebsd-fs Sat Mar 24 20:19:39 2001 Delivered-To: freebsd-fs@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id EA35737B719; Sat, 24 Mar 2001 20:19:32 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id OAA14767; Sun, 25 Mar 2001 14:19:19 +1000 Date: Sun, 25 Mar 2001 14:18:43 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Dima Dorfman Cc: Gerald Pfeifer , freebsd-hackers@FreeBSD.ORG, freebsd-fs@FreeBSD.ORG Subject: Re: Displaying options for current NFS mounts In-Reply-To: <20010324221539.A025A3E09@bazooka.unixfreak.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message