Udev rules and kernel device names
Quoted 3 lines · Lindsay Haisley
After reading a bit of the udev code I finally answered my own question on this. The information required to match KERNEL keys in rules _is_ in sysfs, it's just that it's not well documented anywhere.
'man udevinfo' shows that documentation :)
udevinfo -a -p /sys/block/hda
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Thus spake Greg KH on Mon, Oct 25, 2004 at 12:51:32AM CDT
Quoted 10 lines · Lindsay Haisley
Quoted 3 lines
After reading a bit of the udev code I finally answered my own question on this. The information required to match KERNEL keys in rules _is_ in sysfs, it's just that it's not well documented anywhere.
'man udevinfo' shows that documentation :)
udevinfo -a -p
/sys/block/hdagreg k-h
How about this, as output from kscan:
$ ./kscan
block: KERNEL="fd0"
KERNEL="hda"
KERNEL="hda1"
KERNEL="hda2"
KERNEL="hda3"
KERNEL="hda4"
KERNEL="hdc"
KERNEL="md0"
KERNEL="sda"
KERNEL="sda1"
KERNEL="sdb"
KERNEL="sdb1"
KERNEL="sdc"
KERNEL="sdc1"
KERNEL="sdc2"
KERNEL="sdc3"
KERNEL="sdc5"
KERNEL="sdd"
KERNEL="sdd1"
KERNEL="sde"
KERNEL="sde1"
KERNEL="dm-0"
KERNEL="dm-1"
KERNEL="dm-2"
KERNEL="dm-3"input: KERNEL="event0"
KERNEL="event1"
KERNEL="event2"
KERNEL="mice"
KERNEL="mouse0"<snip...>
copy-n-paste into rules :-)
Signature · 16 lines
Lindsay Haisley | "Fighting against human | PGP public key
FMP Computer Services | creativity is like | available at
512-259-1190 | trying to eradicate | <http://pubkeys.fmp.com>
http://www.fmp.com | dandelions" |
| (Pamela Jones) |
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel