You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1014 B

From 174387405e98cd94c627832ae23abcb9be7e5623 Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Wed, 31 Jan 2018 18:52:47 +0100
Subject: [PATCH 1/3] dmidecode: Fix firmware version of TPM device
Both the operator (detected by clang, reported by Xorg) and the mask
for the minor firmware version field of TPM devices were wrong.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 48a8132058a0 ("dmidecode: Add support for structure type 43 (TPM Device)")
---
dmidecode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dmidecode.c b/dmidecode.c
index 87faaa9..a593170 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -4511,7 +4511,7 @@ static void dmi_decode(const struct dmi_header *h, u16 ver)
case 0x02:
printf("\tFirmware Revision: %u.%u\n",
DWORD(data + 0x0A) >> 16,
- DWORD(data + 0x0A) && 0xFF);
+ DWORD(data + 0x0A) & 0xFFFF);
/*
* We skip the next 4 bytes, as their
* format is not standardized and their
--
2.9.5