[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-hotplug
Subject:    Add atm device description rules
From:       Pantelis Koukousoulas <pktoss () gmail ! com>
Date:       2011-04-23 17:38:52
Message-ID: BANLkTikyTceC16iEDUTLB-som8ax4_XfwQ () mail ! gmail ! com
[Download RAW message or body]

USB ATM devices could use the same treatment that USB ethernet
devices enjoy, so that the atm device inherits the info from its parent
USB device. Would this be useful to include in mainline udev?

cat > 75-atm-description.rules << EOF
# do not edit this file, it will be overwritten on update

ACTION=="remove", GOTO="atm_end"
SUBSYSTEM!="atm", GOTO="atm_end"

SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p"
SUBSYSTEMS=="usb", ENV{ID_MODEL_FROM_DATABASE}=="", IMPORT{program}="usb-db %p"
SUBSYSTEMS=="usb", ATTRS{idVendor}!="", ATTRS{idProduct}!="",
ENV{ID_VENDOR_ID}="$attr{idVendor}",
ENV{ID_MODEL_ID}="$attr{idProduct}"
SUBSYSTEMS=="usb", GOTO="atm_end"

SUBSYSTEMS=="pci", ENV{ID_MODEL_FROM_DATABASE}=="", IMPORT{program}="pci-db %p"
SUBSYSTEMS=="pci", ENV{ID_BUS}="pci",
ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}"

LABEL="atm_end"
EOF

Thanks,
Pantelis
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic