selftests/kexec: update get_secureboot_mode
The get_secureboot_mode() function unnecessarily requires both CONFIG_EFIVAR_FS and CONFIG_EFI_VARS to be enabled to determine if the system is booted in secure boot mode. On some systems the old EFI variable support is not enabled or, possibly, even implemented. This patch first checks the efivars filesystem for the SecureBoot and SetupMode flags, but falls back to using the old EFI variable support. The "secure_boot_file" and "setup_mode_file" couldn't be quoted due to globbing. This patch also removes the globbing. Signed-off-by: NMimi Zohar <zohar@linux.ibm.com> Reviewed-by: NPetr Vorel <pvorel@suse.cz> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
Showing
想要评论请 注册 或 登录