summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
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) = @_;