summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-08 23:26:31 +0100
committerSam James <sam@gentoo.org>2023-04-08 23:26:31 +0100
commit5510459bdacd6cdc1d2a1239cf212609a4e38921 (patch)
tree0d736aa1ebb4103f066c5e35acac370d1d3abc1d /sys-apps/dmidecode/files
parentdev-lang/eisl: Stabilize 2.85 amd64, #904052 (diff)
downloadgentoo-5510459bdacd6cdc1d2a1239cf212609a4e38921.tar.gz
gentoo-5510459bdacd6cdc1d2a1239cf212609a4e38921.tar.bz2
gentoo-5510459bdacd6cdc1d2a1239cf212609a4e38921.zip
sys-apps/dmidecode: backport HPE OEM record 137 fix
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps/dmidecode/files')
-rw-r--r--sys-apps/dmidecode/files/dmidecode-3.5-backport-HPE-OEM-record-137-fix.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/sys-apps/dmidecode/files/dmidecode-3.5-backport-HPE-OEM-record-137-fix.patch b/sys-apps/dmidecode/files/dmidecode-3.5-backport-HPE-OEM-record-137-fix.patch
new file mode 100644
index 000000000000..b1c0270c4762
--- /dev/null
+++ b/sys-apps/dmidecode/files/dmidecode-3.5-backport-HPE-OEM-record-137-fix.patch
@@ -0,0 +1,39 @@
+As recommended by upstream on their website.
+
+From 80de376231e903d2cbea95e51ffea31860502159 Mon Sep 17 00:00:00 2001
+From: Jerry Hoemann <jerry.hoemann@hpe.com>
+Date: Mon, 3 Apr 2023 10:15:12 +0200
+Subject: dmioem: HPE OEM Record 237 Firmware change
+
+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>
+--- a/dmioem.c
++++ b/dmioem.c
+@@ -1094,7 +1094,8 @@ static int dmi_decode_hp(const struct dmi_header *h)
+ * 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 dmi_header *h)
+ 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:
+--
+cgit v1.1