summaryrefslogtreecommitdiffstats
path: root/perl-install/sbus_probing/main.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/sbus_probing/main.pm')
-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('.'); }