diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-07-23 22:15:54 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-07-23 22:15:54 +0000 |
commit | d97b226e3049c136401416aaceaba39587cd0605 (patch) | |
tree | fa094813196f6d3f8615c3f999d116cf1566ca08 /perl-install/modules.pm | |
parent | f01f53d988172e9d5bf52e969dd404dc48458000 (diff) | |
download | drakx-d97b226e3049c136401416aaceaba39587cd0605.tar drakx-d97b226e3049c136401416aaceaba39587cd0605.tar.gz drakx-d97b226e3049c136401416aaceaba39587cd0605.tar.bz2 drakx-d97b226e3049c136401416aaceaba39587cd0605.tar.xz drakx-d97b226e3049c136401416aaceaba39587cd0605.zip |
no_comment
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r-- | perl-install/modules.pm | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm index bb6cd2216..88852a039 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -533,22 +533,11 @@ sub load_thiskind($;&$) { my ($type, $f, $pcic) = @_; my %loaded_text; - require pci_probing::main; - my @pcidevs = pci_probing::main::probe($type); - log::l("pci probe found " . scalar @pcidevs . " $type devices"); - - require sbus_probing::main; - my @sbusdevs = sbus_probing::main::probe($type); - log::l("sbus probe found " . scalar @sbusdevs . " $type devices"); - - my @pcmciadevs = get_pcmcia_devices($type, $pcic); - log::l("pcmcia probe found " . scalar @pcmciadevs . " $type devices"); - - my @devs = (@pcidevs, @sbusdevs, @pcmciadevs); + my @devs = detect_devices::matching_type($type, $pcic); + log::l("probe found " . scalar @devs . " $type devices"); my %devs; foreach (@devs) { - my ($text, $mod) = @$_; - pci_probing::main::check($mod) or next; + my ($text, $mod) = ($_->{description}, $_->{driver}); $devs{$mod}++ and log::l("multiple $mod devices found"), next; log::l("found driver for $mod"); &$f($text, $mod) if $f; @@ -571,8 +560,8 @@ sub load_thiskind($;&$) { last if !$@; } } - if (my ($c) = (pci_probing::main::probe('AUDIO'), sbus_probing::main::probe('AUDIO'))) { - add_alias("sound", $c->[1]) if pci_probing::main::check($c->[1]); + if (my ($c) = (detect_devices::matching_type('AUDIO'))) { + add_alias("sound", $c->{driver}); } } my @loaded = map { $loaded_text{$_} || $_ } @{$loaded{$type} || []}; @@ -585,8 +574,8 @@ sub pcmcia_need_config($) { } sub get_pcmcia_devices($$) { - my ($type, $pcic) = @_; - my (@devs, $module, $desc); + my ($pcic) = @_; + my (@devs, $module, $desc, $type, $device); #- try to setup pcmcia if cardmgr is not running. if (pcmcia_need_config($pcic)) { @@ -611,9 +600,9 @@ sub get_pcmcia_devices($$) { foreach (cat_("/var/run/stab")) { $desc = $1 if /^Socket\s+\d+:\s+(.*)/; - $module = $1 if /^\d+\s+$type[^\s]*\s+([^\s]+)/; + ($type, $module, $device) = ($1, $2, $3) if /^\d+\s+(\S+)\s+(\S+)\s+\S+\s+(\S+)/; if ($desc && $module) { - push @devs, [ $desc, $module ]; + push @devs, { description => $desc, driver => $module, type => $type, device => $device }; $desc = $module = undef; } } |