From: Lennart Poettering Date: Thu, 11 Feb 2021 22:09:54 +0000 (+0100) Subject: efivars: debug log if we fail to detect whether /sys/firmware/efi/ exists X-Git-Tag: v248-rc1~151^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b4c163002be61e240b1622a64917aee1793c00a;p=thirdparty%2Fsystemd.git efivars: debug log if we fail to detect whether /sys/firmware/efi/ exists --- diff --git a/src/basic/efivars.c b/src/basic/efivars.c index 5aeddef7e2d..8e8d5f1d0b5 100644 --- a/src/basic/efivars.c +++ b/src/basic/efivars.c @@ -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;