Subject: Re: Work-in-progress "wedges" implementation
To: NetBSD tech-kern <>
From: Joerg Sonnenberger <>
List: tech-kern
Date: 09/23/2004 18:09:36
On Thu, Sep 23, 2004 at 09:27:06AM -0500, Chapman Flack wrote:
> > Linux created something like /dev/disk/[controller]/[channel]/[partition].
> > This means mapping the hierache of the device tree into devfs. They use[d]
> > devfsd to create compat entries like /dev/hda.
> > 
> > The big problem of this is the verbosity of the entries, you are forced to
> > remember the device hierachie all along.
> It seems to me Solaris does (or once did) both: there was
> /devices/bus/controller/locator/bus/controller/locator/locator/locator,
> and /dev/shortname was a symlink to it.  I liked that approach, because you
> had short names in /dev that you could choose as you liked (just normal
> symlinks after all), plus if you ever wondered exactly what device is
> /dev/shortname you just ls -l it.

I found it a hassle to use in Linux because of the side effects, e.g.
specifying root. I know that "expose hierachie in /dev" has some positive
aspects as well. :)

> > I think the approach of either announcing the device once [for the admin
> > to figure out where the device attached] or using UUIDs / naming for
> > mounting
> Just announcing the device in dmesg seems just a bit too austere for my
> taste.  It doesn't offer much support for automation - yes, shell scripts
> may be Turing expressive, but dmesg | my-custom-parse-and-mount-script
> is not my idea of a good time.

Announcing in dmesg is good enough for the patter of plugin USB stick and
find out which device it does end up as. Having a nice program to plot
the entire in-kernel device hierachie or the path to a specific device
is something I want to implement for DragonFly as soon as time permits.
This can be done compartively easy both under newbus or the configure
system of NetBSD, the kernel already has all the information needed.


> -Chap