Subject: Re: devfs vs. device locators
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: Bill Studenmund <wrstuden@netbsd.org>
List: current-users
Date: 06/09/2003 15:03:10
On Mon, 9 Jun 2003, Greg A. Woods wrote:

> [ On Monday, June 9, 2003 at 13:17:05 (-0700), Bill Studenmund wrote: ]
> > Subject: Re: devfs, was single user mode file comparisons
> >
> > I'd like something better. What we really need is for all our devices to
> > have locators. Then we tie the permissions (and names) to the locator.
> > That way if the device moves around, you still get the same names and
> > permissions. Then you'd pretty much get what we have now, which is a /dev
> > that you can rename & change permissions as you see fit.
>
> What do you have in mind, in terms of filesystem objects, to implement
> these locators?  Are they like a special type of symlink but where the
> target is some generic representation of the 'config' locator?

Not sure. Either symlinks on a real file system that an overlay layered
file system turns into device nodes (based on what it read from the
symlink contents), or a pseudo-file-system (a la /kern or /proc) that had
a file somewhere say in /etc with name/locator/owner/permission info in
it.

The first idea would take the symlinks (which could hold ownership, name,
and permissions) and through the magic of layered file systems turn them
into the correct device nodes. Problem with this is that you still have to
run something like MAKEDEV to have nodes show up.

The second, which I like a bit more right now, is a totally synthetic file
system. Info in the config file is used to configure the nodes that are
visable. Nodes that aren't in the config file ("new" locators) would show
up with default names and ownerships. Not sure how the defaults would be
set, root/wheel rw------- maybe?

Take care,

Bill