efivars: debug log if we fail to detect whether /sys/firmware/efi/ exists

This commit is contained in:
Lennart Poettering
2021-02-11 23:09:54 +01:00
parent 1c3c43a417
commit 5b4c163002
+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;