fix the code

Signed-off-by: Anton Arapov <anton@redhat.com>
This commit is contained in:
Anton Arapov 2013-04-26 09:02:07 +02:00
parent 615b2d47f2
commit 88d35ec5db
2 changed files with 44 additions and 2 deletions

View File

@ -0,0 +1,37 @@
diff -up dmidecode-2.12/dmidecode.c.smbios_fix dmidecode-2.12/dmidecode.c
--- dmidecode-2.12/dmidecode.c.smbios_fix 2013-04-26 08:57:32.917716438 +0200
+++ dmidecode-2.12/dmidecode.c 2013-04-26 08:57:54.439758540 +0200
@@ -712,7 +712,6 @@ static const char *dmi_processor_family(
{ 0x3D, "Opteron 6200" },
{ 0x3E, "Opteron 4200" },
{ 0x3F, "FX" },
-
{ 0x40, "MIPS" },
{ 0x41, "MIPS R4000" },
{ 0x42, "MIPS R4200" },
@@ -729,7 +728,6 @@ static const char *dmi_processor_family(
{ 0x4D, "Opteron 6300" },
{ 0x4E, "Opteron 3300" },
{ 0x4F, "FirePro" },
-
{ 0x50, "SPARC" },
{ 0x51, "SuperSPARC" },
{ 0x52, "MicroSPARC II" },
@@ -1176,7 +1174,7 @@ static const char *dmi_processor_upgrade
"Socket LGA1356-3" /* 0x2C */
};
- if (code >= 0x01 && code <= 0x2A)
+ if (code >= 0x01 && code <= 0x2C)
return upgrade[code - 0x01];
return out_of_spec;
}
@@ -2338,7 +2336,7 @@ static void dmi_memory_device_type_detai
{
int i;
- for (i = 1; i <= 14; i++)
+ for (i = 1; i <= 15; i++)
if (code & (1 << i))
printf(" %s", detail[i - 1]);
}

View File

@ -1,12 +1,13 @@
Summary: Tool to analyse BIOS DMI data Summary: Tool to analyse BIOS DMI data
Name: dmidecode Name: dmidecode
Version: 2.12 Version: 2.12
Release: 1%{?dist} Release: 2%{?dist}
Epoch: 1 Epoch: 1
Group: System Environment/Base Group: System Environment/Base
License: GPLv2+ License: GPLv2+
Source0: %{name}-%{version}.tar.bz2 Source0: %{name}-%{version}.tar.bz2
URL: http://www.nongnu.org/dmidecode/ URL: http://www.nongnu.org/dmidecode/
Patch0: dmidecode-2.12-smbios_fix.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: automake autoconf BuildRequires: automake autoconf
ExclusiveArch: %{ix86} x86_64 ia64 ExclusiveArch: %{ix86} x86_64 ia64
@ -24,6 +25,7 @@ I/O ports (e.g. serial, parallel, USB).
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .smbios_fix
%build %build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
@ -47,7 +49,10 @@ rm -rf ${buildroot}
%{_mandir}/man8/* %{_mandir}/man8/*
%changelog %changelog
* Wed Apr 17 2013 Anton Arapov <anton@redhat.com> - 1:2:12-1 * Fri Apr 26 2013 Anton Arapov <anton@redhat.com> - 1:2.12-2
- Fixup, so that it actually read SMBIOS 2.8.0 table.
* Wed Apr 17 2013 Anton Arapov <anton@redhat.com> - 1:2.12-1
- Update to upstream 2.12 release. - Update to upstream 2.12 release.
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.11-10 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.11-10