summaryrefslogtreecommitdiffstats
path: root/perl-install/network/ndiswrapper.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/network/ndiswrapper.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/network/ndiswrapper.pm')
-rw-r--r--perl-install/network/ndiswrapper.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/network/ndiswrapper.pm b/perl-install/network/ndiswrapper.pm
index 6adb1f1fa..8bbc731c9 100644
--- a/perl-install/network/ndiswrapper.pm
+++ b/perl-install/network/ndiswrapper.pm
@@ -55,9 +55,9 @@ sub find_matching_devices {
foreach my $interface (all($net_path)) {
my $dev_path = "$net_path/$interface/device";
-l $dev_path or next;
-
- my %map = (vendor => 'vendor', device => 'id');
- if (every { hex(chomp_(cat_("$dev_path/$_"))) eq $device->{$map{$_}} } keys %map) {
+ my $is_usb = -f "$dev_path/bInterfaceNumber";
+ my $map = detect_devices::get_sysfs_device_id_map($dev_path);
+ if (every { hex(chomp_(cat_("$dev_path/" . $map->{$_}))) eq $device->{$_} } keys %$map) {
my $driver = readlink("$net_path/$interface/driver");
$driver =~ s!.*/!!;
push @devices, [ $interface, $driver ];