summaryrefslogtreecommitdiffstats
path: root/perl-install/network/ethernet.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-15 09:59:47 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-15 09:59:47 +0000
commit29141c7cf499bddd75b6ca33b63046890e0664a7 (patch)
tree948854c5d494842e730c0dc48b9f0e1aaf32c249 /perl-install/network/ethernet.pm
parente04df295b98977f38f3374ed33a9731daf784cd6 (diff)
downloaddrakx-backup-do-not-use-29141c7cf499bddd75b6ca33b63046890e0664a7.tar
drakx-backup-do-not-use-29141c7cf499bddd75b6ca33b63046890e0664a7.tar.gz
drakx-backup-do-not-use-29141c7cf499bddd75b6ca33b63046890e0664a7.tar.bz2
drakx-backup-do-not-use-29141c7cf499bddd75b6ca33b63046890e0664a7.tar.xz
drakx-backup-do-not-use-29141c7cf499bddd75b6ca33b63046890e0664a7.zip
(mapIntfToDevice) do not try to match a physical device when SIOCETHTOOL ioctl is not supported
Diffstat (limited to 'perl-install/network/ethernet.pm')
-rw-r--r--perl-install/network/ethernet.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index fc53e28a5..5e95e25c8 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -37,8 +37,9 @@ qq(
sub mapIntfToDevice {
my ($interface) = @_;
- my ($bus, $slot, $func) = map { hex($_) } (c::getHwIDs($interface) =~ /([0-9a-f]+):([0-9a-f]+)\.([0-9a-f]+)/);
- grep { $_->{pci_bus} == $bus && $_->{pci_device} == $slot && $_->{pci_function} == $func } detect_devices::probeall();
+ 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() : {};
}