summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-09-10 15:55:12 +0000
committerFrancois Pons <fpons@mandriva.com>2001-09-10 15:55:12 +0000
commit2fb12b9bc814ef721941a68856221039dbcf3df8 (patch)
tree21f390cb060fc4c25f675042b8eb2c2037174299 /perl-install/detect_devices.pm
parent6cb5dd30efab27e03a47cc0261d087b6e8eedcf5 (diff)
downloaddrakx-2fb12b9bc814ef721941a68856221039dbcf3df8.tar
drakx-2fb12b9bc814ef721941a68856221039dbcf3df8.tar.gz
drakx-2fb12b9bc814ef721941a68856221039dbcf3df8.tar.bz2
drakx-2fb12b9bc814ef721941a68856221039dbcf3df8.tar.xz
drakx-2fb12b9bc814ef721941a68856221039dbcf3df8.zip
moved modules::get_pcmcia_devices into detect_devices::pcmcia_probe.
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm20
1 files changed, 17 insertions, 3 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 8d26f3cd5..2052d5e0d 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -236,14 +236,28 @@ sub usb_probe {
} c::usb_probe();
}
+sub pcmcia_probe {
+ -e "/var/run/stab" or return ();
+
+ my (@devs, $desc);
+ foreach (cat_("/var/run/stab")) {
+ if (/^Socket\s+\d+:\s+(.*)/) {
+ $desc = $1;
+ } else {
+ my (undef, $type, $module, undef, $device) = split;
+ push @devs, { description => $desc, driver => $module, type => $type, device => $device };
+ }
+ }
+ @devs;
+}
+
# pci_probe with $probe_type is unsafe for pci! (bug in kernel&hardware)
-# get_pcmcia_devices provides field "device", used in network.pm
+# pcmcia_probe provides field "device", used in network.pm
# => probeall with $probe_type is unsafe
sub probeall {
my ($probe_type) = @_;
require sbus_probing::main;
- require modules;
- pci_probe($probe_type), usb_probe(), sbus_probing::main::probe(), modules::get_pcmcia_devices();
+ pci_probe($probe_type), usb_probe(), pcmcia_probe(), sbus_probing::main::probe();
}
sub matching_desc {
my ($regexp) = @_;