[lkml]   [2002]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Hardware Inventory [was: Re: ISA slot detection on PCI systems?]

On Sat, 5 Jan 2002, Paul Jakma wrote:

> On Fri, 4 Jan 2002, Dave Jones wrote:
> > When devicefs is ready (or more to the point, the drivers become
> > devicefs aware), something to the effect of ls -R /devices
> > should be possible.
> how does devicefs differ from devfs? eg, on some of my systems i mount
> devfs on /devfs and an ls -l of it shows all the devices that
> currently have drivers that registered them.

It's actually driverfs ;). (I know it's confusing, I wanted devfs, but it
was already taken.)

It exports devices based on their locality. On my test box, I have this

sh-2.05# find pci0/ -type d

Nodes are added by the bus driver as it enumerates the bus, before
device-specific drivers are loaded.

devfs groups devices based on device class (video, net, disk, etc). Adding
primitive support for this should be pretty easy to driverfs, though there
are many nasty details to work out.

Basically, each device already has a directory. When it registers with its
class subsystem (like networking), the subsystem creates a symlink:

class/net/1 -> pci0/00:02.0

(or something like that). It doesn't seem that there needs to be any
explicit devfs_register() in the driver. I could be wrong, but that's my
initial impression...


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:15    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean