dmidecode/dmidecode-2.12-smbios_fix.patch

120 lines
3.3 KiB
Diff
Raw Normal View History

diff -up dmidecode-2.12/dmidecode.c.smbios_fix dmidecode-2.12/dmidecode.c
--- 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" },
@@ -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 +1189,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;
}
@@ -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;
- for (i = 1; i <= 14; i++)
+ for (i = 1; i <= 15; i++)
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