]> git.pld-linux.org Git - packages/dmidecode.git/commitdiff
- rel 2; new cpu/memory support auto/th/dmidecode-2.12-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 7 Nov 2014 09:52:48 +0000 (10:52 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 7 Nov 2014 09:52:48 +0000 (10:52 +0100)
dmidecode-2.12-smbios_fix.patch [new file with mode: 0644]
dmidecode.spec

diff --git a/dmidecode-2.12-smbios_fix.patch b/dmidecode-2.12-smbios_fix.patch
new file mode 100644 (file)
index 0000000..f39205d
--- /dev/null
@@ -0,0 +1,86 @@
+diff -up dmidecode-2.12/CHANGELOG.smbios_fix dmidecode-2.12/CHANGELOG
+--- dmidecode-2.12/CHANGELOG.smbios_fix        2013-05-09 09:44:35.668592078 +0200
++++ dmidecode-2.12/CHANGELOG   2013-05-09 09:44:44.742610559 +0200
+@@ -1,3 +1,10 @@
++2013-04-24  Jean Delvare  <khali@linux-fr.org>
++
++      * dmidecode.c: Strip trailig zeroes from memory voltage values
++        (DMI type 17).
++      * dmidecode.c: Fix support for new processor upgrade types (DMI
++        type 4) and new memory device type (DMI type 17.)
++
+ 2013-04-17  Anton Arapov  <anton@redhat.com>
+       Update to support SMBIOS specification version 2.8.0.
+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:44:26.404573273 +0200
++++ dmidecode-2.12/dmidecode.c 2013-05-09 09:44:44.745610565 +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
+@@ -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;
+ }
+@@ -2236,7 +2234,7 @@ static void dmi_memory_voltage_value(u16
+       if (code == 0)
+               printf(" Unknown");
+       else
+-              printf(" %.3f V", (float)(i16)code / 1000);
++              printf(code % 100 ? " %g V" : " %.1f V", (float)code / 1000);
+ }
+ static const char *dmi_memory_device_form_factor(u8 code)
+@@ -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]);
+       }
+@@ -3657,13 +3655,13 @@ static void dmi_decode(const struct dmi_
+                       dmi_memory_device_speed(WORD(data + 0x20));
+                       printf("\n");
+                       if (h->length < 0x28) break;
+-                      printf("\tMinimum voltage: ");
++                      printf("\tMinimum Voltage: ");
+                       dmi_memory_voltage_value(WORD(data + 0x22));
+                       printf("\n");
+-                      printf("\tMaximum voltage: ");
++                      printf("\tMaximum Voltage: ");
+                       dmi_memory_voltage_value(WORD(data + 0x24));
+                       printf("\n");
+-                      printf("\tConfigured voltage: ");
++                      printf("\tConfigured Voltage: ");
+                       dmi_memory_voltage_value(WORD(data + 0x26));
+                       printf("\n");
+                       break;
index e95ca8fc2d6353c01a4f92bb733f23db76f67109..5aec5975d0026d41a2b392d3dca638dd9d3e1521 100644 (file)
@@ -2,11 +2,12 @@ Summary:      A tool for dumping a computer's DMI table contents
 Summary(pl.UTF-8):     Narzędzie do zrzucania zawartości tabeli DMI komputera
 Name:          dmidecode
 Version:       2.12
-Release:       1
+Release:       2
 License:       GPL v2+
 Group:         Applications/System
 Source0:       http://savannah.nongnu.org/download/dmidecode/%{name}-%{version}.tar.bz2
 # Source0-md5: a406f3cbb27736491698697beeddb781
+Patch0:                dmidecode-2.12-smbios_fix.patch
 URL:           http://www.nongnu.org/dmidecode/
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -25,6 +26,7 @@ BIOS-u.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__make} \
This page took 0.086338 seconds and 4 git commands to generate.