summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-09-28 15:53:43 +0000
committerFrancois Pons <fpons@mandriva.com>1999-09-28 15:53:43 +0000
commit99c9b0680ce235c7e5bb6d18a8154a147e70947c (patch)
treee42f58e16872cdf6f4030936f9050ebc5bb99b20 /perl-install/modules.pm
parent4d1e2e9740a607609d497adf72dbef43e9f1a4c8 (diff)
downloaddrakx-99c9b0680ce235c7e5bb6d18a8154a147e70947c.tar
drakx-99c9b0680ce235c7e5bb6d18a8154a147e70947c.tar.gz
drakx-99c9b0680ce235c7e5bb6d18a8154a147e70947c.tar.bz2
drakx-99c9b0680ce235c7e5bb6d18a8154a147e70947c.tar.xz
drakx-99c9b0680ce235c7e5bb6d18a8154a147e70947c.zip
*** empty log message ***
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm29
1 files changed, 27 insertions, 2 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 010e7b48f..a829247fc 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -271,8 +271,13 @@ sub get_stage1_conf {
sub load_thiskind($;&) {
my ($type, $f) = @_;
- my @devs = pci_probing::main::probe($type);
- log::l("pci probe found " . scalar @devs . " $type devices");
+ my @pcidevs = pci_probing::main::probe($type);
+ log::l("pci probe found " . scalar @pcidevs . " $type devices");
+
+ my @pcmciadevs = get_pcmcia_devices($type);
+ log::l("pcmcia probe found " . scalar @pcmciadevs . " $type devices");
+
+ my @devs = (@pcidevs, @pcmciadevs);
my %devs; foreach (@devs) {
my ($text, $mod) = @$_;
@@ -285,6 +290,26 @@ sub load_thiskind($;&) {
@devs;
}
+sub get_pcmcia_devices($) {
+ my ($type) = @_;
+ my $file = "/var/run/stab";
+ my @devs;
+ my $module;
+ my $desc;
+
+ local *F;
+ open F, $file or return; #- no pcmcia is not an error.
+ while (<F>) {
+ $desc = $1 if /^Socket\s+\d+:\s+(.*)/;
+ $module = $1 if /^\d+\s+$type[^\s]*\s+([^\s]+)/;
+ if ($desc && $module) {
+ push @devs, [ $desc, $module ];
+ $desc = $module = undef;
+ }
+ }
+ @devs;
+}
+
#-#- This assumes only one of each driver type is loaded
#-sub removeDeviceDriver {
#- my ($type) = @_;