chiark / gitweb /
rule_generator: net - fix usb comment generation
authorKay Sievers <kay.sievers@vrfy.org>
Sun, 26 Apr 2009 18:53:30 +0000 (20:53 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sun, 26 Apr 2009 18:53:30 +0000 (20:53 +0200)
On Sat, Apr 4, 2009 at 22:17, Omair Eshkenazi <stimpson@phys.huji.ac.il> wrote:
> I noticed that in (70-)persistent-net.rules, the comments for USB devices
> are missing the device/vendor id's. Example:
> # USB device 0x:0x (rt73usb)

extras/rule_generator/75-persistent-net-generator.rules

index 75b4534..5c2f100 100644 (file)
@@ -37,7 +37,7 @@ ENV{MATCHADDR}=="00:00:00:00:00:00", ENV{MATCHADDR}=""
 
 # build comment line for generated rule:
 SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)"
-SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="?*", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)"
 SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)"
 SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})"