There was a bug where is_efi_*() could return a negative error value, which would be treated as 'true',
just make this a bool in the helper library to avoid the problem.
return r;
}
-int is_efi_secure_boot(void) {
- return read_flag("SecureBoot");
+bool is_efi_secure_boot(void) {
+ return read_flag("SecureBoot") > 0;
}
-int is_efi_secure_boot_setup_mode(void) {
- return read_flag("SetupMode");
+bool is_efi_secure_boot_setup_mode(void) {
+ return read_flag("SetupMode") > 0;
}
int efi_reboot_to_firmware_supported(void) {
#define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004
bool is_efi_boot(void);
-int is_efi_secure_boot(void);
-int is_efi_secure_boot_setup_mode(void);
+bool is_efi_secure_boot(void);
+bool is_efi_secure_boot_setup_mode(void);
int efi_reboot_to_firmware_supported(void);
int efi_get_reboot_to_firmware(void);
int efi_set_reboot_to_firmware(bool value);