Subject: Re: CFR: The Auto-Generation Block/Character Device Switch Tables
To: Darren Reed <darrenr@reed.wattle.id.au>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 05/15/2002 10:47:11
On Wed, 15 May 2002, Darren Reed wrote:

> In some email I received from Bill Studenmund, sie wrote:
> > Maybe. Doing something like that would let us pick our own major numbers
> > whereever we wanted. We would have to make sure our major numbers avoided
> > all of the vendor ones we emulated, since we can't tell where the device
> > node was that was opened.
>
> Hmmm, that's not as convienient as I hoped it would be.
>
> But won't netscape being run (say) under solaris emulation try and open
> /emul/dev/sd0c first, before /dev/sd0c ?  Couldn't you have a per-emulation
> table to map major numbers from one to another ?  The problem might be how
> to get emul information that far down, if this was a good idea.

/emul/whatever/dev/sd0c, but yes.

The problem I see is that it's not that we can't have different
major->device tables for different emulations. We can, it will be a bit
gross, but we can. The problem is that what we really want is different
major->device tables for /dev and for /emul/foo/dev.

Say someone feeds that emulation program /../dev/sd0c. It will open
/dev/sd0c, not /emul/foo/dev/sd0c. But we would look at (for major->device
mapping) that node as if it were in /emul/foo/dev. If the same major
number is in use in the different emulations, we have a permissions
problem. :-)

Take care,

Bill