PATCH (to usbutils-0.7): usbmodules extension to automatically handle new modules.usbmap format
Here is a patch that adds support in usbmodules for the
new modules.usbmap format that includes match_flags. With this patch, usbmodules continues to support the old format as well.
I made this patch with "diff -u -w" because it would have
been a lot of work to try to match the indentation of the code that is in CVS. I leave it to Thomas to reindent the resulting file before checking it into CVS if he wants to maintain the unusual indentation.
I am cc'ing this to linux-hotplug-devel just so they can
be aware that this issue has been addressed. If anyone wants to respond to this email about goofs in the patch, they probably want to drop linux-hotplug-devel from the cc list.
Anyhow, please let me know if this patch work. I have
verified that works with a Metricom modem I have handy.
Signature · 4 lines
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104 [email protected] \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America fax +1 408 261-6631 "Free Software For The Rest Of Us."
usbmodules.h +12 -0
@@ -1,7 +1,19 @@/* Declaring the usb_device_id fields as unsigned int simplifies the sscanf call. */ +#define USB_MATCH_VENDOR 0x0001 +#define USB_MATCH_PRODUCT 0x0002 +#define USB_MATCH_DEV_LO 0x0004 +#define USB_MATCH_DEV_HI 0x0008 +#define USB_MATCH_DEV_CLASS 0x0010 +#define USB_MATCH_DEV_SUBCLASS 0x0020 +#define USB_MATCH_DEV_PROTOCOL 0x0040 +#define USB_MATCH_INT_CLASS 0x0080 +#define USB_MATCH_INT_SUBCLASS 0x0100 +#define USB_MATCH_INT_PROTOCOL 0x0200 +struct usbmap_entry { +unsigned int match_flags;/* * vendor/product codes are checked, if vendor is nonzero * Range is for device revision (bcdDevice), inclusive;
usbmodules.c +100 -41
214 lines not on this page · raw message