summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-05-02 08:56:10 +0000
committerOlivier Blin <oblin@mandriva.org>2005-05-02 08:56:10 +0000
commitd7b672aeb285a54570198714812b3ecf610b40f4 (patch)
tree89fcf16758a71bf60f1bad0133f6491f46a777d7 /perl-install/detect_devices.pm
parent8547eaa3c667ab5761786cfe95c66dc4f9bba8a9 (diff)
downloaddrakx-d7b672aeb285a54570198714812b3ecf610b40f4.tar
drakx-d7b672aeb285a54570198714812b3ecf610b40f4.tar.gz
drakx-d7b672aeb285a54570198714812b3ecf610b40f4.tar.bz2
drakx-d7b672aeb285a54570198714812b3ecf610b40f4.tar.xz
drakx-d7b672aeb285a54570198714812b3ecf610b40f4.zip
fix USB devices detection for ndiswrapper
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 63297d78b..48b5bd7a1 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -579,6 +579,14 @@ sub is_wireless_interface {
c::isNetDeviceWirelessAware($interface) || -e "/sys/class/net/$interface/wireless";
}
+sub get_sysfs_device_id_map {
+ my ($dev_path) = @_;
+ my $is_usb = -f "$dev_path/bInterfaceNumber";
+ $is_usb ?
+ { id => '../idProduct', vendor => '../idVendor' } :
+ { id => "device", subid => "subsystem_device", vendor => "vendor", subvendor => "subsystem_vendor" };
+}
+
sub getNet() {
grep { is_lan_interface($_) }
uniq(