]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
efivars: debug log if we fail to detect whether /sys/firmware/efi/ exists
authorLennart Poettering <lennart@poettering.net>
Thu, 11 Feb 2021 22:09:54 +0000 (23:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 11 Feb 2021 22:09:54 +0000 (23:09 +0100)
src/basic/efivars.c

index 5aeddef7e2dfae4ada90b6b4ff8c862df7718f1d..8e8d5f1d0b594485f9ab5b00ce5f8c00e41d61dd 100644 (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;