[Toybox] mdev features request.

Piotr Karbowski piotr.karbowski at gmail.com
Wed May 7 12:21:01 PDT 2014


Hi,

I'd like to request few additional features into toybox's mdev thats are 
already part of busybox's mdev implamentation.

* /dev/mdev.seq support

That would get us serialization of mdev events, to avoid race conditions 
and make scripting mdev as simple as possible. In busybox's mdev you 
just create empty /dev/mdev.seq to turn this feature on.

* Get $DEVNAME from uevent (sysfs)

That would allow us to get not only device name but also the dit it 
supposed to goes into, from the kernel, so instead of get event for 
device 'controlC0' it would get it as 'snd/controlC0'. Added in busybox 
in commit c3cf1e30a3022453311a7e9fe11d94c7a381640e. Testable by 
executing 'env' via mdev (via mdev.conf for example).

* environment variable match

Currently all you can do is match your rules basing on $DEVNAME. With 
env variable support you could match on $SUBSYSTEM or even $DEVTYPE, 
thus rules could be like:

     SUBSYSTEM=usb;DEVTYPE=usb_device;.* root:root 660

instead of

     usbdev.* root:root 660

Added to busybox on commit 40b97fb31ec7c24db706b47182f400f2a13dbbfc

-- Piotr.



More information about the Toybox mailing list