summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-06-02 02:08:06 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-06-02 02:08:06 +0000
commitc7f7e91919ee72b885d5b3253c608393279945ae (patch)
treedf8b892cd5327a89000d39d33824c556e90aaf2a /perl-install/detect_devices.pm
parente5c9364696dd1de43b51b39cd9f3792c2a50a3cf (diff)
downloaddrakx-backup-do-not-use-c7f7e91919ee72b885d5b3253c608393279945ae.tar
drakx-backup-do-not-use-c7f7e91919ee72b885d5b3253c608393279945ae.tar.gz
drakx-backup-do-not-use-c7f7e91919ee72b885d5b3253c608393279945ae.tar.bz2
drakx-backup-do-not-use-c7f7e91919ee72b885d5b3253c608393279945ae.tar.xz
drakx-backup-do-not-use-c7f7e91919ee72b885d5b3253c608393279945ae.zip
create detect_devices::probe_name() & detect_devices::probe_unique_name() and use them
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index a73b24598..2b3e3ff4c 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -779,6 +779,18 @@ sub matching_driver {
my (@list) = @_;
grep { member($_->{driver}, @list) } probeall();
}
+sub probe_name {
+ my ($name) = @_;
+ map { $_->{driver} =~ /^$name:(.*)/ } probeall();
+}
+sub probe_unique_name {
+ my ($name) = @_;
+ my @l = uniq(probe_name($name));
+ if (@l > 1) {
+ log::l("oops, more than one $name from probe: ", join(' ', @l));
+ }
+ $l[0];
+}
sub stringlist() {
map {