From 846ab104cade96599f8a27cc8a0c54dc919f908f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 23 Nov 2017 22:05:46 +0100 Subject: [PATCH] efivars: if OsIndicationsSupported does not exist, assume that reboot-to-firmware is not available It's not advertised and hence not available. Fixes: #7424 --- src/shared/efivars.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/efivars.c b/src/shared/efivars.c index cf2966fd5cb..9ca51cf7507 100644 --- a/src/shared/efivars.c +++ b/src/shared/efivars.c @@ -119,6 +119,8 @@ int efi_reboot_to_firmware_supported(void) { return -EOPNOTSUPP; r = efi_get_variable(EFI_VENDOR_GLOBAL, "OsIndicationsSupported", NULL, &v, &s); + if (r == -ENOENT) /* variable doesn't exist? it's not supported then */ + return -EOPNOTSUPP; if (r < 0) return r; if (s != sizeof(uint64_t)) -- 2.47.3