diff options
author | Arnaud Patard <rtp@mageia.org> | 2011-03-18 21:25:31 +0000 |
---|---|---|
committer | Arnaud Patard <rtp@mageia.org> | 2011-03-18 21:25:31 +0000 |
commit | 071f701fb4148c83c8c9c0f121150468fa5a064b (patch) | |
tree | 7c2de670eb52d94da871e89f42ca2e3d42194674 | |
parent | 51f081cd0ac8d1f895f39244747b96082a6d0a6a (diff) | |
download | drakx-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
-rw-r--r-- | perl-install/any.pm | 2 | ||||
-rw-r--r-- | perl-install/detect_devices.pm | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 70ce7a6c8..fb73df348 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -1254,7 +1254,7 @@ sub report_bug { join '', map { chomp; "$_\n" } header("lspci"), detect_devices::stringlist(), header("pci_devices"), cat_("/proc/bus/pci/devices"), - header("dmidecode"), `dmidecode`, + header("dmidecode"), arch() =~ /86/ ? `dmidecode` : (), header("fdisk"), arch() =~ /ppc/ ? `pdisk -l` : `fdisk -l`, header("scsi"), cat_("/proc/scsi/scsi"), header("/sys/bus/scsi/devices"), -d '/sys/bus/scsi/devices' ? `ls -l /sys/bus/scsi/devices` : (), 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"; |