EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab) { EFI_STATUS rc = EFI_SUCCESS; int i; InitializeLib(image, systab); rc = show_signature_support(systab); dumpvar(systab, &EfiGlobalVariable, L"SetupMode"); dumpvar(systab, &EfiGlobalVariable, L"SecureBoot"); dumpvar(systab, &EfiGlobalVariable, EFI_PLATFORM_KEY_NAME); dumpvar(systab, &EfiGlobalVariable, EFI_KEY_EXCHANGE_KEY_NAME); dumpvar(systab, &gEfiImageSecurityDatabaseGuid, EFI_IMAGE_SECURITY_DATABASE); dumpvar(systab, &gEfiImageSecurityDatabaseGuid, EFI_IMAGE_SECURITY_DATABASE1); return rc; }
EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab) { UINTN argc; CHAR16 **argv; EFI_STATUS rc = EFI_SUCCESS; int i; UINTN showguid = 0; InitializeLib(image, systab); rc = get_args(image, &argc, &argv); if (EFI_ERROR(rc)) { Print(L"ERROR: Parsing command line arguments: %d\n", rc); return rc; } if (argc == 2) { if (!StrCmp(argv[1], L"help") || !StrCmp(argv[1], L"/help") || !StrCmp(argv[1], L"--help") || !StrCmp(argv[1], L"-?")) { usage(); return EFI_SUCCESS; } else if (!StrCmp(argv[1], L"/showguid") || !StrCmp(argv[1], L"--showguid") || !StrCmp(argv[1], L"-s")) { showguid = 1; } else { usage(); return EFI_INVALID_PARAMETER; } } rc = show_signature_support(systab, showguid); dumpvar(systab, &EfiGlobalVariable, L"SetupMode"); dumpvar(systab, &EfiGlobalVariable, L"SecureBoot"); dumpvar(systab, &EfiGlobalVariable, EFI_PLATFORM_KEY_NAME); dumpvar(systab, &EfiGlobalVariable, EFI_KEY_EXCHANGE_KEY_NAME); dumpvar(systab, &gEfiImageSecurityDatabaseGuid, EFI_IMAGE_SECURITY_DATABASE); dumpvar(systab, &gEfiImageSecurityDatabaseGuid, EFI_IMAGE_SECURITY_DATABASE1); return rc; }