From 92a007e249d66d5cea56f9bbe750f1622b016f48 Mon Sep 17 00:00:00 2001 From: Krystian Hebel Date: Wed, 24 Apr 2024 14:47:12 +0200 Subject: [PATCH] qubes-hcl-report: fix TPM family detection For quite some time, "/sys/class/tpm/tpm0/tpm_version_major" is present also for TPM 1.2. To properly test for family, the content of this file must be read. It is "1" for TPM 1.2 and "2" for TPM 2.0. Signed-off-by: Krystian Hebel --- qvm-tools/qubes-hcl-report | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qvm-tools/qubes-hcl-report b/qvm-tools/qubes-hcl-report index 677f870d2..44f0614dd 100755 --- a/qvm-tools/qubes-hcl-report +++ b/qvm-tools/qubes-hcl-report @@ -272,7 +272,7 @@ else HAP_VERBOSE="No" fi -if [[ -f "/sys/class/tpm/tpm0/tpm_version_major" ]] +if [[ -f "/sys/class/tpm/tpm0/tpm_version_major" && $(< "/sys/class/tpm/tpm0/tpm_version_major") == "2" ]] then TPM="Device present (TPM 2.0)" TPM_s="2.0"