About Unix and Linux

Thursday, March 30, 2006

hotplug usermap file format

A sample file is here.

# script match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi
# bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass
# bInterfaceSubClass bInterfaceProtocol driver_info
perf 0x0003 0x04b4 0x8613 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
perf 0x0003 0x06cd 0x010b 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000

match_flags tells the hotplug usb agent what to match for to
run the script.

match_flags for the various fields are
idVendor:0x0001
idProduct:0x0002
bcdDevice_lo:0x0004
and so on

so if I needed to match the idVendor & idProduct only with
what is there match_flags needs to be 0x0001 + 0x0002 = 0x0003

So if the necessary fields match the script named "perf"
will be called.

0 Comments:

Post a Comment

<< Home