diff options
-rw-r--r-- | src/shared/efivars.c | 8 | ||||
-rw-r--r-- | src/shared/efivars.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/efivars.c b/src/shared/efivars.c index b82f74a459..2a925f3970 100644 --- a/src/shared/efivars.c +++ b/src/shared/efivars.c @@ -87,12 +87,12 @@ static int read_flag(const char *varname) { 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) { diff --git a/src/shared/efivars.h b/src/shared/efivars.h index e796bf415d..420013a61d 100644 --- a/src/shared/efivars.h +++ b/src/shared/efivars.h @@ -33,8 +33,8 @@ #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); |