Subject: Re: Porting code with switch/case on mount type (was int)
To: Chris G. Demetriou <>
From: David Maxwell <>
List: current-users
Date: 05/17/1999 21:45:20
On Mon, May 17, 1999 at 02:35:02PM -0700, Chris G. Demetriou wrote:
> (Christos Zoulas) writes:
> > In article <> (David Maxwell) writes:
> > >I see that our first argument to mount is a const char now, (not sure when
> FYI, the change was made ... a _long_ time ago.  from the cvs log of
> vfs_syscalls.c:
> revision 1.19
> date: 1994/04/14 04:05:32;  author: cgd;  state: Exp;  lines: +1 -1
> fs types are names now; accompanying changes.
> wow, more than 5 years ago, in fact.

I had no idea how long, I just saw the delta between us and FreeBSD.
Doesn't surprise me one bit :-)

> > Dunno, if (strcmp(..) == 0) {
> >        } else if (strcmp(..) == 0) {
> >        } ...

That was the obvious one, I just thought there may have been a compatibility
function around, or an example of a hash etc that was needed elsewhere

> if you have some weird performance needs, you could use a hash
> function/table or something, but that's always seemed like overkill to
> me.

Probably not a problem, unless I put in support for all the FS types that
aren't in the code yet too.

This is for a native NetBSD m3 compiler.

David Maxwell,| --> Mastery of UNIX, like
mastery of language, offers real freedom. The price of freedom is always dear,
but there's no substitute. Personally, I'd rather pay for my freedom than live
in a bitmapped, pop-up-happy dungeon like NT. - Thomas Scoville