summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-08-27 08:12:32 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-08-27 08:12:32 +0000
commit9c54be7d583ad68041f25c3ccb0502b011a0e0ff (patch)
tree8043239bddc2f8368a639a8e9c92f00b41366b37 /perl-install
parent6c9e831de8a374dbbd7a0fdfbf137b8f3fc064ab (diff)
downloaddrakx-9c54be7d583ad68041f25c3ccb0502b011a0e0ff.tar
drakx-9c54be7d583ad68041f25c3ccb0502b011a0e0ff.tar.gz
drakx-9c54be7d583ad68041f25c3ccb0502b011a0e0ff.tar.bz2
drakx-9c54be7d583ad68041f25c3ccb0502b011a0e0ff.tar.xz
drakx-9c54be7d583ad68041f25c3ccb0502b011a0e0ff.zip
(matching_driver) introduce it in order to factorize some tests
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index b9416d084..bec2de7a4 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -464,7 +464,7 @@ sub getSerialModem {
sub getModem {
my ($modules_conf) = @_;
getSerialModem($modules_conf, {}), matching_driver__regexp('www\.linmodems\.org'),
- grep { member($_->{driver}, qw(snd-atiixp-modem snd-intel8x0m)) } probeall();
+ matching_driver(qw(snd-atiixp-modem snd-intel8x0m));
}
sub getSpeedtouch() {
@@ -476,7 +476,7 @@ sub getBewan() {
}
sub getSagem() {
- grep { member($_->{driver}, qw(adiusbadsl eagle-usb)) } probeall();
+ matching_driver(qw(adiusbadsl eagle-usb));
}
# generate from the following from eci driver sources:
@@ -693,6 +693,12 @@ sub matching_driver__regexp {
my ($regexp) = @_;
grep { $_->{driver} =~ /$regexp/i } probeall();
}
+
+sub matching_driver {
+ my (@list) = @_;
+ grep { member($_->{driver}, @list) } probeall();
+}
+
sub stringlist() {
map {
sprintf("%-16s: %s%s%s",