diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-05-25 07:29:35 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-05-25 07:29:35 +0000 |
commit | ab83b32a149df3209b09ed01c87c9b9868e5371e (patch) | |
tree | 7e970f24e244aeb2b23197d727229658fffcc04a /perl-install/network/ethernet.pm | |
parent | 93bf03a92166625f23b7709add3793ab8ce48c75 (diff) | |
download | drakx-backup-do-not-use-ab83b32a149df3209b09ed01c87c9b9868e5371e.tar drakx-backup-do-not-use-ab83b32a149df3209b09ed01c87c9b9868e5371e.tar.gz drakx-backup-do-not-use-ab83b32a149df3209b09ed01c87c9b9868e5371e.tar.bz2 drakx-backup-do-not-use-ab83b32a149df3209b09ed01c87c9b9868e5371e.tar.xz drakx-backup-do-not-use-ab83b32a149df3209b09ed01c87c9b9868e5371e.zip |
(mapIntfToDevice) only try to lookup pci or usb device by bus location
if its location is defined (some driver are returning bogus data on
ETHTOOL_GDRVINFO command)
Diffstat (limited to 'perl-install/network/ethernet.pm')
-rw-r--r-- | perl-install/network/ethernet.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index d5db313f1..193bbf539 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -39,7 +39,8 @@ sub mapIntfToDevice { my ($interface) = @_; my $hw_addr = c::getHwIDs($interface); my ($bus, $slot, $func) = map { hex($_) } ($hw_addr =~ /([0-9a-f]+):([0-9a-f]+)\.([0-9a-f]+)/); - $hw_addr ? grep { $_->{pci_bus} == $bus && $_->{pci_device} == $slot && $_->{pci_function} == $func } detect_devices::probeall() : {}; + $hw_addr && (every { defined $_ } $bus, $slot, $func) ? + grep { $_->{pci_bus} == $bus && $_->{pci_device} == $slot && $_->{pci_function} == $func } detect_devices::probeall() : {}; } |