From 99c9b0680ce235c7e5bb6d18a8154a147e70947c Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 28 Sep 1999 15:53:43 +0000 Subject: *** empty log message *** --- perl-install/modules.pm | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'perl-install/modules.pm') 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 () { + $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) = @_; -- cgit v1.2.1