static int uefivarinfo_init(fwts_framework *fw) { if (fwts_firmware_detect() != FWTS_FIRMWARE_UEFI) { fwts_log_info(fw, "Cannot detect any UEFI firmware. Aborted."); return FWTS_ABORTED; } if (fwts_lib_efi_runtime_load_module(fw) != FWTS_OK) { fwts_log_info(fw, "Cannot load efi_runtime module. Aborted."); return FWTS_ABORTED; } fd = fwts_lib_efi_runtime_open(); if (fd == -1) { fwts_log_info(fw, "Cannot open EFI test driver. Aborted."); return FWTS_ABORTED; } return FWTS_OK; }
static int uefirtauthvar_init(fwts_framework *fw) { if (fwts_firmware_detect() != FWTS_FIRMWARE_UEFI) { fwts_log_info(fw, "Cannot detect any UEFI firmware. Aborted."); return FWTS_ABORTED; } if (fwts_lib_efi_runtime_load_module(fw) != FWTS_OK) { fwts_log_info(fw, "Cannot load efi_runtime module. Aborted."); return FWTS_ABORTED; } fd = open("/dev/efi_runtime", O_WRONLY | O_RDWR); if (fd == -1) { fwts_log_info(fw, "Cannot open efi_runtime driver. Aborted."); return FWTS_ABORTED; } uefirtvariable_env_cleanup(); return FWTS_OK; }