Accepting request 1076890 from Base:System
Fix the decoding of the last field of HPE OEM record type 237 (DIMM Vendor Information). OBS-URL: https://build.opensuse.org/request/show/1076890 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dmidecode?expand=0&rev=45
This commit is contained in:
commit
7a1e57a199
@ -1,5 +1,6 @@
|
||||
From: Jean Delvare <jdelvare@suse.de>
|
||||
Subject: Use -DALIGNMENT_WORKAROUND on arm as well
|
||||
Git-commit: a85ed8540993f4cba831e1d1d0224ba6640d9c4b
|
||||
|
||||
The arm build log shows a lot warnings about casts increasing the
|
||||
required alignment of target type. This suggests that this
|
||||
@ -11,8 +12,8 @@ Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
||||
config.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- dmidecode.orig/config.h
|
||||
+++ dmidecode/config.h
|
||||
--- dmidecode-3.5.orig/config.h
|
||||
+++ dmidecode-3.5/config.h
|
||||
@@ -22,7 +22,7 @@
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 20 10:27:24 UTC 2023 - Jean Delvare <jdelvare@suse.com>
|
||||
Mon Apr 3 10:04:57 UTC 2023 - Jean Delvare <jdelvare@suse.de>
|
||||
|
||||
- dmioem-hpe-oem-record-237-firmware-change.patch: Fix the decoding
|
||||
of the last field of HPE OEM record type 237 (DIMM Vendor
|
||||
Information).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 20 10:27:24 UTC 2023 - Jean Delvare <jdelvare@suse.de>
|
||||
|
||||
- arm-use-alignment-workaround.patch: Fix the massive build
|
||||
warnings on armv7l.
|
||||
|
@ -28,6 +28,7 @@ Source1: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{vers
|
||||
# https://savannah.nongnu.org/project/memberlist-gpgkeys.php?group=dmidecode
|
||||
Source2: %{name}.keyring
|
||||
Patch1: arm-use-alignment-workaround.patch
|
||||
Patch2: dmioem-hpe-oem-record-237-firmware-change.patch
|
||||
Provides: pmtools:%{_sbindir}/dmidecode
|
||||
Obsoletes: pmtools < 20071117
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -51,6 +52,7 @@ the BIOS told it to.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
CFLAGS="%{optflags}" make %{?_smp_mflags}
|
||||
|
39
dmioem-hpe-oem-record-237-firmware-change.patch
Normal file
39
dmioem-hpe-oem-record-237-firmware-change.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From: Jerry Hoemann <jerry.hoemann@hpe.com>
|
||||
Date: Mon, 3 Apr 2023 10:15:12 +0200
|
||||
Subject: dmioem: HPE OEM Record 237 Firmware change
|
||||
Git-ommit: 80de376231e903d2cbea95e51ffea31860502159
|
||||
|
||||
HPE OEM record type 237 offset 0x09 field was changed from a single
|
||||
byte STRING to a two byte WORD representing date.
|
||||
|
||||
Fixes: cdab638dabb7 ("dmioem: Decode HPE OEM Record 237")
|
||||
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
|
||||
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
||||
---
|
||||
dmioem.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
--- dmidecode-3.5.orig/dmioem.c
|
||||
+++ dmidecode-3.5/dmioem.c
|
||||
@@ -1094,7 +1094,8 @@ static int dmi_decode_hp(const struct dm
|
||||
* 0x06 | Manufacture|STRING | DIMM Manufacturer
|
||||
* 0x07 | Part Number|STRING | DIMM Manufacturer's Part Number
|
||||
* 0x08 | Serial Num |STRING | DIMM Vendor Serial Number
|
||||
- * 0x09 | Spare Part |STRING | DIMM Spare Part Number
|
||||
+ * 0x09 | Man Date | BYTE | DIMM Manufacture Date (YEAR) in BCD
|
||||
+ * 0x0A | Man Date | BYTE | DIMM Manufacture Date (WEEK) in BCD
|
||||
*/
|
||||
if (gen < G9) return 0;
|
||||
pr_handle_name("%s DIMM Vendor Information", company);
|
||||
@@ -1105,8 +1106,9 @@ static int dmi_decode_hp(const struct dm
|
||||
pr_attr("DIMM Manufacturer Part Number", "%s", dmi_string(h, data[0x07]));
|
||||
if (h->length < 0x09) break;
|
||||
pr_attr("DIMM Vendor Serial Number", "%s", dmi_string(h, data[0x08]));
|
||||
- if (h->length < 0x0A) break;
|
||||
- pr_attr("DIMM Spare Part Number", "%s", dmi_string(h, data[0x09]));
|
||||
+ if (h->length < 0x0B) break;
|
||||
+ if (WORD(data + 0x09))
|
||||
+ pr_attr("DIMM Manufacture Date", "20%02x-W%02x", data[0x09], data[0x0A]);
|
||||
break;
|
||||
|
||||
case 238:
|
Loading…
Reference in New Issue
Block a user