From owner-freebsd-hackers Mon Dec 24 0: 5:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from warez.scriptkiddie.org (uswest-dsl-142-38.cortland.com [209.162.142.38]) by hub.freebsd.org (Postfix) with ESMTP id 1D4F537B416 for ; Mon, 24 Dec 2001 00:05:42 -0800 (PST) Received: from [192.168.69.11] (unknown [192.168.69.11]) by warez.scriptkiddie.org (Postfix) with ESMTP id 5F5BF62D01; Mon, 24 Dec 2001 00:05:38 -0800 (PST) Date: Mon, 24 Dec 2001 00:06:20 -0800 (PST) From: Lamont Granquist To: Chad David Cc: Wayne Pascoe , Subject: Re: Repost - f_type value in statfs structure In-Reply-To: <20011223023352.A5404@colnta.acns.ab.ca> Message-ID: <20011224000418.T2506-100000@coredump.scriptkiddie.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 23 Dec 2001, Chad David wrote: > On Sat, Dec 22, 2001 at 11:11:12PM +0000, Wayne Pascoe wrote: > > Chad David writes: > > > > > > The issue that I am having is detecting valid filesystems to do > > > > further checks on. I am only interested in checking local filesystems > > > > such as UFS. > > > > > > Check for the MNT_LOCAL flag in f_flags. > > > > > -- code example snipped -- > > > > Thanks for that. I've tried it and the problem with it is that it > > reports things like procfs and devfs as being local. The only things > > that don't appear local are things like nfs mounts. > > > > I guess I need a way to check only filesystems mounted off of > > disks. Is there any way of doing this ? > > They are local :). Local means that the fs originates on the local > machine. > > I think you should be able to call getvfsbyname() and check the flags in > the resulting vfsconf struct for VFCF_SYNTHETIC, but I'm not sure how > reliable that is. I'm pretty sure devfs is ok, but procfs might not be? try vn_isdisk(vp, &error) where vp is the vnode pointer to the block device? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message