On Fri, 31 Jul 2015, Giulio Bernardi wrote:

> Okay, i checked a little bit and now I understand, sorry. They are pointers 
> to 
> different offset of the same string (the inquiry result), that's why it's 
> only 
> meaningful to check first 8 and subsequent 16 characters. Sorry.
> 
> The problem is that:
> 
> {"", "Scanner"}
> and
> {"Inateck",""}
> 
> do match because an empty string always matches. So vendor matches because 
> the 
> entry from the list is empty, while model matches because the model of the 
> actual device is empty.

With my patch, empty strings do _not_ match.  Not unless _both_ strings 
are empty.

> I am trying to think what the right solution might be. The {"", "Scanner"} 
> case 
> seems to suggest that "" is meant as a wildcard.

No, it doesn't.  It means that the vendor is empty (all ' '
characters).

>  Maybe the right solution would 
> be that "" is a wildcard only in the device list, and not in the real device? 
> That is, if a real device has "" as a vendor/model string, it should only 
> match 
> a device from a list that has "", and not interpreted as a wildcard.

These things are not wildcards.  Go look more carefully at my patch and 
figure out what is really happening.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to