summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorArnaud Patard <rtp@mageia.org>2011-03-18 21:25:31 +0000
committerArnaud Patard <rtp@mageia.org>2011-03-18 21:25:31 +0000
commit071f701fb4148c83c8c9c0f121150468fa5a064b (patch)
tree7c2de670eb52d94da871e89f42ca2e3d42194674 /perl-install/detect_devices.pm
parent51f081cd0ac8d1f895f39244747b96082a6d0a6a (diff)
downloaddrakx-071f701fb4148c83c8c9c0f121150468fa5a064b.tar
drakx-071f701fb4148c83c8c9c0f121150468fa5a064b.tar.gz
drakx-071f701fb4148c83c8c9c0f121150468fa5a064b.tar.bz2
drakx-071f701fb4148c83c8c9c0f121150468fa5a064b.tar.xz
drakx-071f701fb4148c83c8c9c0f121150468fa5a064b.zip
- try to parse DMI informations only on x86 to avoid reading/writing some random
memory location on arm/mips
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 42f14aff6..89698fd99 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -943,9 +943,14 @@ sub pcmcia_probe() {
my $dmi_probe;
sub dmi_probe() {
+ if (arch() !~ /86/) {
+ $dmi_probe ||= [];
+ }
+ else {
$dmi_probe ||= [ map {
/(.*?)\t(.*)/ && { bus => 'DMI', driver => $1, description => $2 };
} $> ? () : c::dmi_probe() ];
+ }
@$dmi_probe;
}
@@ -1045,7 +1050,7 @@ sub dmidecode() {
return @dmis if $dmidecode_already_runned;
return if $>;
- my ($ver, @l) = run_program::get_stdout('dmidecode');
+ my ($ver, @l) = arch() =~ /86/ ? run_program::get_stdout('dmidecode') : ();
my $tab = "\t";