push fixes from upstream

Signed-off-by: Anton Arapov <anton@redhat.com>
This commit is contained in:
Anton Arapov 2013-05-09 09:15:35 +02:00
parent 88d35ec5db
commit 1769dbaa19
2 changed files with 95 additions and 10 deletions

View File

@ -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 "<OUT OF SPEC>"
static const char *bad_index = "<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

View File

@ -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 <anton@redhat.com> - 1:2.12-3
- Accomodate few more necesary, to enable SMBIOS v2.8, changes from upstream.
* Fri Apr 26 2013 Anton Arapov <anton@redhat.com> - 1:2.12-2
- Fixup, so that it actually read SMBIOS 2.8.0 table.