From owner-freebsd-chat Sun Oct 18 15:23:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA15036 for freebsd-chat-outgoing; Sun, 18 Oct 1998 15:23:36 -0700 (PDT) (envelope-from owner-freebsd-chat@FreeBSD.ORG) Received: from picnic.mat.net (picnic.mat.net [206.246.122.117]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA15031 for ; Sun, 18 Oct 1998 15:23:33 -0700 (PDT) (envelope-from chuckr@mat.net) Received: from localhost (chuckr@localhost) by picnic.mat.net (8.9.1/8.8.5) with ESMTP id SAA16402; Sun, 18 Oct 1998 18:22:38 -0400 (EDT) Date: Sun, 18 Oct 1998 18:22:37 -0400 (EDT) From: Chuck Robey To: Terry Lambert cc: Andy Farkas , freebsd-chat@FreeBSD.ORG Subject: Re: mount flags In-Reply-To: <199810182150.OAA12751@usr07.primenet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 18 Oct 1998, Terry Lambert wrote: > > Yeah, something fishy is going on here with statfs(2). According to the > > man page on a 2.2.7 system, and in , there are definitions > > for struct statfs->f_type, but on a 3.0-current, they have strangely > > disappeared. > > The use of this field in order to determine FS type presupposes the > definition of a manifest value in the mount.h file each time someone > adds a new FS type. > > This is basically an utterly bogus thing to presuppose, since it > means that you have to recompile the kernel and modify mount.h to > add support for a new FS type. I'm not sure about this, Terry, so I'm asking for a little discussion .. and I moved it to chat, to cut the complaints about noise. The situation is where I'm asking statfs what kind of fs I happen to be manipulating (not where I'm asking for a mount, or anything like a fs action initiation). There are a set of manifest constants that are pretty darn common among all the unixes, and what they mean is unambiguous ... in mount.h, normally. I see that work has been done to move that info into an ascii string, but: 1) there is no registry for what the mapping is between an fs type and what string is used to ID it, and 2) why is it that a string comparison is felt to be cleaner, in a world so worried about buffer overruns? That part at least seems terribly wrong. On top of that, the data is done via linker set ... seems to be an abuse-trap. Why is this cleaner? ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@glue.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run Journey2 and picnic (FreeBSD-current) (301) 220-2114 | and jaunt (NetBSD). ----------------------------+----------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message