Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Oct 1998 18:22:37 -0400 (EDT)
From:      Chuck Robey <chuckr@mat.net>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        Andy Farkas <andyf@speednet.com.au>, freebsd-chat@FreeBSD.ORG
Subject:   Re: mount flags
Message-ID:  <Pine.BSF.4.05.9810181816080.348-100000@picnic.mat.net>
In-Reply-To: <199810182150.OAA12751@usr07.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/mount.h>, 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9810181816080.348-100000>