dmidecode 3.1: Added patch (Fix firmware version of TPM device)
authorMatthias Fischer <matthias.fischer@ipfire.org>
Sun, 18 Mar 2018 16:40:47 +0000 (17:40 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 19 Mar 2018 11:56:19 +0000 (11:56 +0000)
For details see:
http://git.savannah.gnu.org/cgit/dmidecode.git/commit/?id=174387405e98cd94c627832ae23abcb9be7e5623

"Both the operator (detected by clang, reported by Xorg) and the mask
for the minor firmware version field of TPM devices were wrong."

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/dmidecode
src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch [new file with mode: 0644]

index 8f8a249..fa01015 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2016  IPFire Team  <info@ipfire.org>                          #
+# Copyright (C) 2018  IPFire Team  <info@ipfire.org>                          #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -71,6 +71,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
        cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dmidecode/0005-nothing-should-go-into-usr-local.patch
+       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch
        cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
        cd $(DIR_APP) && make install
        @rm -rf $(DIR_APP)
diff --git a/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch b/src/patches/dmidecode/add_support_for_structure_type_43_tpm_device.patch
new file mode 100644 (file)
index 0000000..07f4f7e
--- /dev/null
@@ -0,0 +1,30 @@
+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: 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
+-- 
+cgit v1.0-41-gc330
+