Subject: Re: kern/3711: ibcs2 emulation lacks sysfs()
To: None <>
From: Chris G. Demetriou <>
List: netbsd-bugs
Date: 06/05/1997 07:30:50
> 	To implement sysfs() one needs to establish a mapping
> 	between filesystem-type name and number.  I noticed that
> 	the FreeBSD emulation already has such a mapping, so I
> 	extended that emulation a bit and made it common instead
> 	of making another version.  The mapping should in theory
> 	be dynamic, but in practice it suffices to add new
> 	filesystem types as (or preferrably a bit before) they
> 	are implemented for Net/FreeBSD.

This patch, and the understanding behind it, is incorrect.

That table is necessarily OS-dependent.  It maps from file system type
to the file system type number that _the target OS_ would use for that
file system type.

Those numbers do not necessarily have any similarity in different
OSes, so the translation table sill have to be different.
Additionally, the supported file systems in each OS are going to be
slightly different.  Only file systems which are supported by the
target OS should be listed in the table.  Others use some undefined or
reserved (or otherwise 'weird') value.

So, it's incorrect to attempt to use the FreeBSD table for iBCS2, or
to generalize it to any other system, for that matter.

Also, the mapping should _not_ be dynamic, for the reasons cited

If the needs of sysfs() are different than what that table was
intended to do, well, then it should probably use a different
mechanism.  8-)