summaryrefslogtreecommitdiffstats
path: root/perl-install/sbus_probing
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-07-23 22:15:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-07-23 22:15:54 +0000
commitd97b226e3049c136401416aaceaba39587cd0605 (patch)
treefa094813196f6d3f8615c3f999d116cf1566ca08 /perl-install/sbus_probing
parentf01f53d988172e9d5bf52e969dd404dc48458000 (diff)
downloaddrakx-backup-do-not-use-d97b226e3049c136401416aaceaba39587cd0605.tar
drakx-backup-do-not-use-d97b226e3049c136401416aaceaba39587cd0605.tar.gz
drakx-backup-do-not-use-d97b226e3049c136401416aaceaba39587cd0605.tar.bz2
drakx-backup-do-not-use-d97b226e3049c136401416aaceaba39587cd0605.tar.xz
drakx-backup-do-not-use-d97b226e3049c136401416aaceaba39587cd0605.zip
no_comment
Diffstat (limited to 'perl-install/sbus_probing')
-rw-r--r--perl-install/sbus_probing/main.pm28
1 files changed, 2 insertions, 26 deletions
diff --git a/perl-install/sbus_probing/main.pm b/perl-install/sbus_probing/main.pm
index baf385819..f226eeea8 100644
--- a/perl-install/sbus_probing/main.pm
+++ b/perl-install/sbus_probing/main.pm
@@ -126,36 +126,12 @@ sub prom_walk($$$$) {
$nextnode = c::prom_getsibling($node) and prom_walk($sbus_probed, $nextnode, $sbus, $ebus);
}
-sub check {
- my $ok = $_[0] !~ /unknown/;
- $ok or log::l("skipping $text, no module available (if you know one, please mail bugs\@linux-mandrake.com)");
- $ok
-}
-
-sub probe($) {
- my ($type) = @_;
-
+sub probe {
eval { modules::load("openprom") };
my $root_node = c::prom_open();
my @l;
prom_walk(\@l, $root_node, 0, 0);
c::prom_close();
-
- $type eq '.' ? @l : map { [ @$_[1..$#$_] ] } grep { !$type || $_->[0] =~ /$type/i } @l;
+ map { my %l; @l{qw(type description drivers)} = @$_ } @l;
}
-
-sub matching_desc($;$) {
- my ($regexp) = @_;
-
- eval { modules::load("openprom") };
- my $root_node = c::prom_open();
- my @l;
-
- prom_walk(\@l, $root_node, 0, 0);
- c::prom_close();
-
- grep { !$type || $_->[1] =~ /$regexp/ } @l;
-}
-
-sub list { map { "$_->[1] ($_->[0] $_->[2])" } probe('.'); }