diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2006-01-03 13:13:01 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2006-01-03 13:13:01 +0000 |
commit | 285bca65e8fc96d8063c5e13a78cfbbfb9f3fdb5 (patch) | |
tree | 8b65f5b5ea22250781c87c469631b49e887a40cf /perl-install | |
parent | 37f0aed14e66244bb6e4795cfbaf00247ecc6852 (diff) | |
download | drakx-backup-do-not-use-285bca65e8fc96d8063c5e13a78cfbbfb9f3fdb5.tar drakx-backup-do-not-use-285bca65e8fc96d8063c5e13a78cfbbfb9f3fdb5.tar.gz drakx-backup-do-not-use-285bca65e8fc96d8063c5e13a78cfbbfb9f3fdb5.tar.bz2 drakx-backup-do-not-use-285bca65e8fc96d8063c5e13a78cfbbfb9f3fdb5.tar.xz drakx-backup-do-not-use-285bca65e8fc96d8063c5e13a78cfbbfb9f3fdb5.zip |
(get_eth_cards) simplify
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/network/ethernet.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index 86d85c7c6..c97f45f1c 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -85,9 +85,8 @@ sub get_eth_cards { my $drv = readlink("$dev_path/driver"); if ($drv && $drv =~ s!.*/!!) { $a = $drv unless $detected_through_ethtool; - my %l; 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 %l = map { $_ => hex(chomp_(cat_("$dev_path/" . $sysfs_fields->{$_}))) } keys %$sysfs_fields; my @cards = grep { my $dev = $_; every { $dev->{$_} eq $l{$_} } keys %l } detect_devices::probeall(); $description ||= $cards[0]{description} if @cards == 1; } elsif (!$a && -e "/sys/class/net/$interface/wireless") { |