summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2022-05-25 11:58:58 +0200
committerJean Delvare <jdelvare@suse.de>2022-05-25 11:58:58 +0200
commit8f0f2d8d04800f59193a9d04b527f7a81bdd599a (patch)
tree82892fdbfc98576554e4c51466c675b85ea9903f
parenta09530f708087e88d08b62a55553236e7734dc75 (diff)
downloaddmidecode-git-8f0f2d8d04800f59193a9d04b527f7a81bdd599a.tar.gz
dmioem: Fix HP type 203 preliminary checks and header
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> Reviewed-by: Jerry Hoemann <jerry.hoemann@hpe.com>
-rw-r--r--dmioem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dmioem.c b/dmioem.c
index 53ac9e9..61569a6 100644
--- a/dmioem.c
+++ b/dmioem.c
@@ -380,9 +380,9 @@ static int dmi_decode_hp(const struct dmi_header *h)
* 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 &&