summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2004-01-13 12:41:52 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2004-01-13 12:41:52 +0000
commit8bbfff60b0abe467f5ec1e95facdfbfd86e1c9c4 (patch)
tree7e8512f507d2454c75d0983918cd95488be30109 /perl-install
parent58f604869ed79dd73e01a4955efbadd97226635d (diff)
downloaddrakx-8bbfff60b0abe467f5ec1e95facdfbfd86e1c9c4.tar
drakx-8bbfff60b0abe467f5ec1e95facdfbfd86e1c9c4.tar.gz
drakx-8bbfff60b0abe467f5ec1e95facdfbfd86e1c9c4.tar.bz2
drakx-8bbfff60b0abe467f5ec1e95facdfbfd86e1c9c4.tar.xz
drakx-8bbfff60b0abe467f5ec1e95facdfbfd86e1c9c4.zip
detect_devices::matching_driver -> matching_desc but matching driver names (kernel modules)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/card.pm2
-rw-r--r--perl-install/common.pm2
-rw-r--r--perl-install/detect_devices.pm6
-rw-r--r--perl-install/modules.pm2
4 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 52ce4f177..3d2ed0064 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -130,7 +130,7 @@ sub default_ATI_fglrx_config() { our $default_ATI_fglrx_config }
sub probe() {
#-for Pixel tests
#- my @c = { driver => 'Card:Matrox Millennium G400 DualHead', description => 'Matrox|Millennium G400 Dual HeadCard' };
- my @c = grep { $_->{driver} =~ /(Card|Server|Driver):/ } detect_devices::probeall();
+ my @c = detect_devices::matching_driver('(Card|Server|Driver):');
my @cards = map {
my @l = $_->{description} =~ /(.*?)\|(.*)/;
diff --git a/perl-install/common.pm b/perl-install/common.pm
index dafa208dd..d8072df85 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -86,7 +86,7 @@ sub availableRamMB() {
my $s = MDK::Common::System::availableRamMB();
#- HACK HACK: if i810 and memsize
require detect_devices;
- return $s - 1 if $s == 128 && any { $_->{driver} eq 'Card:Intel 810' } detect_devices::probeall();
+ return $s - 1 if $s == 128 && detect_devices::matching_driver('^Card:Intel 810$');
$s;
}
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 1246fbdb3..47f3f91e0 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -412,7 +412,7 @@ sub getSerialModem {
}
sub getModem() {
- my @pci_modems = grep { $_->{driver} =~ /www.linmodems.org/ } probeall();
+ my @pci_modems = matching_driver('www\.linmodems\.org');
getSerialModem({}), @pci_modems;
}
@@ -574,6 +574,10 @@ sub matching_desc {
my ($regexp) = @_;
grep { $_->{description} =~ /$regexp/i } probeall();
}
+sub matching_driver {
+ my ($regexp) = @_;
+ grep { $_->{driver} =~ /$regexp/i } probeall();
+}
sub stringlist() {
map {
sprintf("%-16s: %s%s%s",
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 27253b594..edf4272d1 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -285,7 +285,7 @@ sub write_conf() {
}
my @l;
push @l, 'scsi_hostadapter' if !is_empty_array_ref($conf{scsi_hostadapter}{probeall});
- push @l, 'bttv' if any { $_->{driver} eq 'bttv' } detect_devices::probeall();
+ push @l, 'bttv' if detect_devices::matching_driver('^bttv$');
append_to_modules_loaded_at_startup("$::prefix/etc/modules", @l);
append_to_modules_loaded_at_startup("$::prefix/etc/modprobe.preload", @l);