udev: change the modalias string for usb devices to include the device name
When the kernel does not provide a modalias, we generate our own for usb devices. For some reason, we generated the expected usb:vXXXXpYYYY string, suffixed by "*". It was added that way already in 796b06c2, but I think that was a mistake, and Kay was thinking about the match pattern instead of the matched string. For example, for a qemu device: old: "usb:v0627p0001*" new: "usb:v0627p0001:QEMU USB Tablet" On the match side, all hwdb files in the wild seem to be using match patterns with "*" at the end. So we can add more stuff to our generated modalias with impunity. This will allow more obvious and more certain matches on USB devices. In principle the vendor+product id should be unique, but it's only 8 digits, and there's a high chance of people getting this wrong. And matching the wrong device would be quite problematic. By including the name in the match string we make a mismatch much less likely.
Loading
Please register or sign in to comment