summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-26 21:33:12 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-26 21:33:12 +0000
commit000d45d58f28f8b1f73785f69671d5aa1bddfdbb (patch)
treea9f968b7483e151afea368e2bb136ee58d5d40d5 /perl-install/network
parentef85643cd8fe0ce9c7ffba731d964d4e94485f8b (diff)
downloaddrakx-000d45d58f28f8b1f73785f69671d5aa1bddfdbb.tar
drakx-000d45d58f28f8b1f73785f69671d5aa1bddfdbb.tar.gz
drakx-000d45d58f28f8b1f73785f69671d5aa1bddfdbb.tar.bz2
drakx-000d45d58f28f8b1f73785f69671d5aa1bddfdbb.tar.xz
drakx-000d45d58f28f8b1f73785f69671d5aa1bddfdbb.zip
(mapIntfToDevice) introduce it in order to map a network interface to a
pci/usb/... device
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/ethernet.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index fc9f8da44..05dbcfc94 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -1,6 +1,6 @@
package network::ethernet; # $Id$
-
+use c;
use network::network;
use modules;
use modules::interactive;
@@ -41,6 +41,13 @@ qq(
}
+sub mapIntfToDevice {
+ my ($interface) = @_;
+ my ($bus, $slot, $func) = map { hex($_) } (c::getHwIDs("eth0") =~ /([0-9a-f])+:([0-9a-f])+\.([0-9a-f]+)/);
+ grep { $_->{pci_bus} == $bus && $_->{pci_device} == $slot } detect_devices::probeall();
+}
+
+
#- conf_network_card_backend : configure the network cards and return the list of them, or configure one specified interface : WARNING, you have to setup the ethernet cards, by calling load_category($in, 'network/main|gigabit|usb', !$::expert, 1) or load_category_backend before calling this function. Basically, you call this function in 2 times.
#- input
#- $prefix