udev rule file query
I have written a UDEV rules file that starts off with the following:
BUS="usb", SYSFS(idVendor)="1234"
My new Linux kernel informs me that BUS and SYSFS will soon be deprecated. So, I guess I should now use:
SUBSYSTEM="usb", ATTR(idVendor)="1234"
But will this work for older systems? It is not clear to me whether the SUBSYSTEM and ATTR keywords have been recognised by udev from the beginning. If not can you tell me when they were introduced?
Martin Payne
Microcosm Ltd
Hello Martin,
Martin Payne [2010-09-01 16:03 +0100]:
Quoted 3 lines
So, I guess I should now use:
SUBSYSTEM="usb", ATTR(idVendor)="1234"
Right, except that it's written ATTR{}, not ATTR().
Quoted 2 lines
But will this work for older systems? It is not clear to me whether the SUBSYSTEM and ATTR keywords have been recognised by udev from the beginning.
Not from the beginning, but NEWS documents this pretty well:
---------------- 8< ----------------
udev 098
====
Bugfixes.
Renaming of some key names (the old names still work):
BUS -> SUBSYSTEMS, ID -> KERNELS, SYSFS -> ATTRS, DRIVER -> DRIVERS. [...]
---------------- 8< ----------------
098 was released in August 2006, so in software terms SUBSYSTEM and ATTR have been around for ages.
Martin
Signature · 2 lines
Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)