dmidecode-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dmidecode] [PATCH] dmioem: Fix HP type 203 preliminary checks and heade


From: Jean Delvare
Subject: [dmidecode] [PATCH] dmioem: Fix HP type 203 preliminary checks and header
Date: Tue, 24 May 2022 14:05:54 +0200

Fix the preliminary check of HP type 203 records:
* If generation is too old, return 0 so that the raw record will be
  displayed.
* If length is too short, still print the record type header.
This is how all other records are handled.

Also drop the duplicate company name in the header.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Jerry Hoemann <jerry.hoemann@hpe.com>
---
 dmioem.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- dmidecode.orig/dmioem.c     2022-05-24 13:46:59.441912644 +0200
+++ dmidecode/dmioem.c  2022-05-24 13:54:14.576638729 +0200
@@ -380,9 +380,9 @@ static int dmi_decode_hp(const struct dm
                         *  0x26  | Bus Number   | BYTE  | PCI Device Bus Number
                         *  0x27  | Func Number  | BTYE  | PCI Device and 
Function Number
                         */
-                       if (gen < G9) break;
+                       if (gen < G9) return 0;
+                       pr_handle_name("%s Device Correlation Record", company);
                        if (h->length < 0x1F) break;
-                       pr_handle_name("%s HP Device Correlation Record", 
company);
                        dmi_hp_203_assoc_hndl("Associated Device Record", 
WORD(data + 0x04));
                        dmi_hp_203_assoc_hndl("Associated SMBus Record",  
WORD(data + 0x06));
                        if (WORD(data + 0x08) == 0xffff && WORD(data + 0x0A) == 
0xffff &&


-- 
Jean Delvare
SUSE L3 Support



reply via email to

[Prev in Thread] Current Thread [Next in Thread]