From owner-freebsd-hackers Mon Dec 24 8: 3:32 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.acns.ab.ca (h24-64-56-135.cg.shawcable.net [24.64.56.135]) by hub.freebsd.org (Postfix) with ESMTP id 2A94637B416 for ; Mon, 24 Dec 2001 08:03:29 -0800 (PST) Received: from colnta.acns.ab.ca (colnta.acns.ab.ca [192.168.1.2]) by mail.acns.ab.ca (8.11.6/8.11.3) with ESMTP id fBOG3K624621; Mon, 24 Dec 2001 09:03:20 -0700 (MST) (envelope-from davidc@colnta.acns.ab.ca) Received: (from davidc@localhost) by colnta.acns.ab.ca (8.11.6/8.11.3) id fBOG3KT07713; Mon, 24 Dec 2001 09:03:20 -0700 (MST) (envelope-from davidc) Date: Mon, 24 Dec 2001 09:03:19 -0700 From: Chad David To: Lamont Granquist Cc: Wayne Pascoe , freebsd-hackers@FreeBSD.ORG Subject: Re: Repost - f_type value in statfs structure Message-ID: <20011224090319.A7670@colnta.acns.ab.ca> Mail-Followup-To: Lamont Granquist , Wayne Pascoe , freebsd-hackers@FreeBSD.ORG References: <20011223023352.A5404@colnta.acns.ab.ca> <20011224000418.T2506-100000@coredump.scriptkiddie.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011224000418.T2506-100000@coredump.scriptkiddie.org>; from lamont@scriptkiddie.org on Mon, Dec 24, 2001 at 12:06:20AM -0800 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 Mon, Dec 24, 2001 at 12:06:20AM -0800, Lamont Granquist wrote: > > > 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? > He is trying to do this from userland, I think...? -- Chad David davidc@acns.ab.ca ACNS Inc. Calgary, Alberta Canada To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message