Updated mdev

Rob Landley rob at landley.net
Tue Dec 13 10:22:54 UTC 2005

On Tuesday 13 December 2005 03:42, Frank Sorenson wrote:

> > I chopped out the hotplug with an eye to adding it back later.  Is the
> > netlink stuff the only way to do this, or does /sbin/hotplug still work?
> /sbin/hotplug will work as well.  Changing /proc/sys/kernel/hotplug to
> mdev appears to execute mdev with one argument (the subsystem) and
> several environment variables (these are the ones I've observed.  There
> may be more):
> ACTION - set to either "add" or "remove"
> DEVPATH - set to the path inside /sys where the dev entry can be found
> SUBSYSTEM - the subsystem the device belongs to
> SEQNUM - a counter of the number of events
> ACTION, DEVPATH, MAJOR, and MINOR appear to be the most useful.

Action and devpath basically what we need.  We already have code to grab major 
and minor, and for adds feeding devpath into the existing function is the 
easiest way to go.

I'm trying to figure out if insmodding the driver is our problem, or if a 
wrapper should calls us if they care?  Hmmm...

> add /block/sda/sda1 8:1
> add /class/misc/tun 10:200
> remove /class/misc/tun 10:200
> remove /block/sda 8:0
> remove /class/usb_device/usbdev1.32 189:31

Looks pretty straightforward.  I'll give it a whack tomorrow.  (_After_ 
clearing a few bugs from the list.)

> Frank

Steve Ballmer: Innovation!  Inigo Montoya: You keep using that word.
I do not think it means what you think it means.

More information about the busybox mailing list