devd and caseful device ID matching on 6.0

Sam Leffler sam at errno.com
Sat Jan 7 18:36:47 PST 2006


Gary Palmer wrote:
> Hi Warner,
> 
> I've been playing with devd and noticed that if you do something like:
> 
> #
> # Dell TrueMobile 1300 WLAN PC Card
> #
> nomatch 10 {
>        match "bus" "pci[0-9]+";
>        match "vendor" "0x14E4";
>        match "device" "0x4320";
>        match "subvendor" "0x1028";
>        match "subdevice" "0x0002";
>        action "kldload BCMWL5_SYS";
> };
> 
> it won't match (at least on 6.0) as the regex that is used is case 
> sensitive.  Since these are hex numbers, could the comparison not be 
> case insensitive?  I'm not sure what implications just making the regex 
> case insensitive will have on other matching clauses (e.g. for "system").

At one point I added shorthand logic in devd for things like vendor, 
device, subvendor, etc. that did numeric comparisons instead of regex's. 
  It might be worthwhile to extend the grammar to have a numeric match 
operator.

	Sam


More information about the freebsd-stable mailing list