Let's make sure that we never assume we booted up in EFI mode if we are
run in a container.
} _packed_;
bool is_efi_boot(void) {
- return access("/sys/firmware/efi", F_OK) >= 0;
+ if (detect_container() > 0)
+ return false;
+
+ return access("/sys/firmware/efi/", F_OK) >= 0;
}
static int read_flag(const char *varname) {
size_t s;
int r;
- if (!is_efi_boot() || detect_container() > 0)
+ if (!is_efi_boot())
return -EOPNOTSUPP;
r = efi_get_variable(EFI_VENDOR_GLOBAL, "OsIndicationsSupported", NULL, &v, &s);