Merge pull request #18558 from poettering/have-tpm2

ask the uefi firmware if TPM2 support is available
This commit is contained in:
Lennart Poettering
2021-02-12 15:49:20 +01:00
committed by GitHub
5 changed files with 45 additions and 1 deletions
+4 -1
View File
@@ -290,8 +290,11 @@ bool is_efi_boot(void) {
if (cache < 0) {
if (detect_container() > 0)
cache = false;
else
else {
cache = access("/sys/firmware/efi/", F_OK) >= 0;
if (!cache && errno != ENOENT)
log_debug_errno(errno, "Unable to test whether /sys/firmware/efi/ exists, assuming EFI not available: %m");
}
}
return cache;