diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-08-27 08:12:32 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-08-27 08:12:32 +0000 |
commit | 9c54be7d583ad68041f25c3ccb0502b011a0e0ff (patch) | |
tree | 8043239bddc2f8368a639a8e9c92f00b41366b37 /perl-install | |
parent | 6c9e831de8a374dbbd7a0fdfbf137b8f3fc064ab (diff) | |
download | drakx-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.pm | 10 |
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", |