27 lines
1009 B
Diff
27 lines
1009 B
Diff
|
From: Jean Delvare <jdelvare@suse.de>
|
||
|
Date: Wed, 31 Jan 2018 18:52:47 +0100
|
||
|
Subject: dmidecode: Fix firmware version of TPM device
|
||
|
Patch-mainline: yes
|
||
|
Git-commit: 174387405e98cd94c627832ae23abcb9be7e5623
|
||
|
|
||
|
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(-)
|
||
|
|
||
|
--- dmidecode-3.1.orig/dmidecode.c 2018-04-17 11:52:35.240556354 +0200
|
||
|
+++ dmidecode-3.1/dmidecode.c 2018-04-17 11:52:39.787614142 +0200
|
||
|
@@ -4506,7 +4506,7 @@ static void dmi_decode(const struct dmi_
|
||
|
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
|