diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-07-29 06:51:32 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-07-29 06:51:32 +0000 |
commit | cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b (patch) | |
tree | a377f8c82843ea51d43bb6e8596c50864950ecbb | |
parent | 3a59c5e2447b09360897677dc21d4fdb3bc68038 (diff) | |
download | drakx-cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b.tar drakx-cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b.tar.gz drakx-cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b.tar.bz2 drakx-cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b.tar.xz drakx-cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b.zip |
new sysfs structure
-rw-r--r-- | perl-install/network/ethernet.pm | 4 | ||||
-rw-r--r-- | perl-install/network/ndiswrapper.pm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index 341e17a36..e20aa0ba4 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -77,11 +77,11 @@ sub get_eth_cards { # 5) try to match a device through sysfs for driver & device description: # (eg: ipw2100 driver for intel centrino do not support ETHTOOL) if (!$description) { - my $drv = readlink("/sys/class/net/$interface/driver"); + my $dev_path = "/sys/class/net/$interface/device"; + my $drv = readlink("$dev_path/driver"); if ($drv && $drv =~ s!.*/!!) { $a = $drv unless $detected_through_ethtool; my %l; - my $dev_path = "/sys/class/net/$interface/device"; my $sysfs_fields = detect_devices::get_sysfs_device_id_map($dev_path); $l{$_} = hex(chomp_(cat_("$dev_path/" . $sysfs_fields->{$_}))) foreach keys %$sysfs_fields; my @cards = grep { my $dev = $_; every { $dev->{$_} eq $l{$_} } keys %l } detect_devices::probeall(); diff --git a/perl-install/network/ndiswrapper.pm b/perl-install/network/ndiswrapper.pm index d135e98c4..c7a592c75 100644 --- a/perl-install/network/ndiswrapper.pm +++ b/perl-install/network/ndiswrapper.pm @@ -58,7 +58,7 @@ sub find_matching_devices { -l $dev_path or next; 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"); + my $driver = readlink("$net_path/$interface/device/driver"); $driver =~ s!.*/!!; push @devices, [ $interface, $driver ] if $driver; } |