From 1769dbaa1945dd421ff0dfb36af339bd8bfbc71e Mon Sep 17 00:00:00 2001 From: Anton Arapov Date: Thu, 9 May 2013 09:15:35 +0200 Subject: [PATCH] push fixes from upstream Signed-off-by: Anton Arapov --- dmidecode-2.12-smbios_fix.patch | 100 +++++++++++++++++++++++++++++--- dmidecode.spec | 5 +- 2 files changed, 95 insertions(+), 10 deletions(-) diff --git a/dmidecode-2.12-smbios_fix.patch b/dmidecode-2.12-smbios_fix.patch index 8eca370..ea590ec 100644 --- a/dmidecode-2.12-smbios_fix.patch +++ b/dmidecode-2.12-smbios_fix.patch @@ -1,23 +1,52 @@ 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( +--- dmidecode-2.12/dmidecode.c.smbios_fix 2013-05-09 09:09:08.000000000 +0200 ++++ dmidecode-2.12/dmidecode.c 2013-05-09 09:13:17.059517709 +0200 +@@ -69,7 +69,7 @@ + #define out_of_spec "" + static const char *bad_index = ""; + +-#define SUPPORTED_SMBIOS_VER 0x0207 ++#define SUPPORTED_SMBIOS_VER 0x0208 + + /* + * Type-independant Stuff +@@ -711,8 +711,12 @@ static const char *dmi_processor_family( + { 0x3C, "Opteron 4100" }, { 0x3D, "Opteron 6200" }, { 0x3E, "Opteron 4200" }, ++<<<<<<< dmidecode.c { 0x3F, "FX" }, -- + ++======= ++ { 0x3F, "FX" }, ++>>>>>>> 1.176 { 0x40, "MIPS" }, { 0x41, "MIPS R4000" }, { 0x42, "MIPS R4200" }, -@@ -729,7 +728,6 @@ static const char *dmi_processor_family( - { 0x4D, "Opteron 6300" }, +@@ -723,6 +727,7 @@ static const char *dmi_processor_family( + { 0x47, "E-Series" }, + { 0x48, "A-Series" }, + { 0x49, "G-Series" }, ++<<<<<<< dmidecode.c + { 0x4A, "Z-Series" }, + { 0x4B, "R-Series" }, + { 0x4C, "Opteron 4300" }, +@@ -730,6 +735,14 @@ static const char *dmi_processor_family( { 0x4E, "Opteron 3300" }, { 0x4F, "FirePro" }, -- + ++======= ++ { 0x4A, "Z-Series" }, ++ { 0x4B, "R-Series" }, ++ { 0x4C, "Opteron 4300" }, ++ { 0x4D, "Opteron 6300" }, ++ { 0x4E, "Opteron 3300" }, ++ { 0x4F, "FirePro" }, ++>>>>>>> 1.176 { 0x50, "SPARC" }, { 0x51, "SuperSPARC" }, { 0x52, "MicroSPARC II" }, -@@ -1176,7 +1174,7 @@ static const char *dmi_processor_upgrade +@@ -1176,7 +1189,7 @@ static const char *dmi_processor_upgrade "Socket LGA1356-3" /* 0x2C */ }; @@ -26,7 +55,32 @@ diff -up dmidecode-2.12/dmidecode.c.smbios_fix dmidecode-2.12/dmidecode.c return upgrade[code - 0x01]; return out_of_spec; } -@@ -2338,7 +2336,7 @@ static void dmi_memory_device_type_detai +@@ -2231,6 +2244,7 @@ static void dmi_memory_device_extended_s + printf(" %lu TB", (unsigned long)code >> 20); + } + ++<<<<<<< dmidecode.c + static void dmi_memory_voltage_value(u16 code) + { + if (code == 0) +@@ -2239,6 +2253,16 @@ static void dmi_memory_voltage_value(u16 + printf(" %.3f V", (float)(i16)code / 1000); + } + ++======= ++static void dmi_memory_voltage_value(u16 code) ++{ ++ if (code == 0) ++ printf(" Unknown"); ++ else ++ printf(code % 100 ? " %g V" : " %.1f V", (float)code / 1000); ++} ++ ++>>>>>>> 1.176 + static const char *dmi_memory_device_form_factor(u8 code) + { + /* 7.18.1 */ +@@ -2338,7 +2362,7 @@ static void dmi_memory_device_type_detai { int i; @@ -35,3 +89,31 @@ diff -up dmidecode-2.12/dmidecode.c.smbios_fix dmidecode-2.12/dmidecode.c if (code & (1 << i)) printf(" %s", detail[i - 1]); } +@@ -3656,6 +3680,7 @@ static void dmi_decode(const struct dmi_ + printf("\tConfigured Clock Speed:"); + dmi_memory_device_speed(WORD(data + 0x20)); + printf("\n"); ++<<<<<<< dmidecode.c + if (h->length < 0x28) break; + printf("\tMinimum voltage: "); + dmi_memory_voltage_value(WORD(data + 0x22)); +@@ -3666,6 +3691,18 @@ static void dmi_decode(const struct dmi_ + printf("\tConfigured voltage: "); + dmi_memory_voltage_value(WORD(data + 0x26)); + printf("\n"); ++======= ++ if (h->length < 0x28) break; ++ printf("\tMinimum Voltage: "); ++ dmi_memory_voltage_value(WORD(data + 0x22)); ++ printf("\n"); ++ printf("\tMaximum Voltage: "); ++ dmi_memory_voltage_value(WORD(data + 0x24)); ++ printf("\n"); ++ printf("\tConfigured Voltage: "); ++ dmi_memory_voltage_value(WORD(data + 0x26)); ++ printf("\n"); ++>>>>>>> 1.176 + break; + + case 18: /* 7.19 32-bit Memory Error Information */ +diff -up dmidecode-2.12/README.smbios_fix dmidecode-2.12/README diff --git a/dmidecode.spec b/dmidecode.spec index ec9f1fa..38bedf2 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -1,7 +1,7 @@ Summary: Tool to analyse BIOS DMI data Name: dmidecode Version: 2.12 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Group: System Environment/Base License: GPLv2+ @@ -49,6 +49,9 @@ rm -rf ${buildroot} %{_mandir}/man8/* %changelog +* Fri May 09 2013 Anton Arapov - 1:2.12-3 +- Accomodate few more necesary, to enable SMBIOS v2.8, changes from upstream. + * Fri Apr 26 2013 Anton Arapov - 1:2.12-2 - Fixup, so that it actually read SMBIOS 2.8.0 table.