From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcus Harnisch Date: Wed, 09 Jan 2002 04:47:27 +0000 Subject: Question about bcdDevice_(lo|hi) Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Hi List, I just started to use linux hotplug (2001_09_19). When I tried to find the reason why no map-entry for my camcorder matches, I came across something I really don't understand. usb.agent matches the bcdDevice columns in a map file using the following statements: : bcdDevice range $bcdDevice_hi $bcdDevice_lo actual $usb_bcdDevice if [ $USB_MATCH_DEV_LO -eq $(( $match_flags & $USB_MATCH_DEV_LO )) ] && [ $usb_bcdDevice -lt $bcdDevice_lo ]; then continue fi # bcdDevice_lo <=3D bcdDevice < bcdDevice_hi if [ $USB_MATCH_DEV_HI -eq $(( $match_flags & $USB_MATCH_DEV_HI )) ] && [ $usb_bcdDevice -ge $bcdDevice_hi ]; then continue fi The according entries in the map-files for all devices are a 4-digit hexnumber for bcdDevice_lo and a 2-digit hexnumber for bcdDevice_hi. With *very* few exceptions if bcdDevice that is greater or equal to bcdDevice_lo (first condition) it is also greater than bcdDevice_hi. This causes no match to be found in the vast majority of cases (=DEvices). In my particular case, bcdDevice is 0x0300. So for test purposes I set up an entry in usb.usermap with bcdDevice_lo to 0x0300. Which 2-digit hexnumber would match the second condition? When I set bcdDevice_hi to any number (well, I didn't try all of 'em :) above 0x02ff, everything worked fine. I really can't believe that this is a bug that nobody has seen before. Can somebody explain that to me? Best regards, Marcus _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel