From b6f94dbeacfc6f0a507413096189304c58dbe66c Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 13 Sep 2017 12:09:40 -0700 Subject: New upstream version 13~git1505328970.9c1c35c5 --- replacements.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'replacements.c') diff --git a/replacements.c b/replacements.c index 01eda0e3..898b42b1 100644 --- a/replacements.c +++ b/replacements.c @@ -52,11 +52,8 @@ #include #include "shim.h" #include "replacements.h" - -/* oh for fuck's sakes.*/ -#ifndef EFI_SECURITY_VIOLATION -#define EFI_SECURITY_VIOLATION 26 -#endif +#include "console.h" +#include "errors.h" static EFI_SYSTEM_TABLE *systab; @@ -129,7 +126,7 @@ start_image(EFI_HANDLE image_handle, UINTN *exit_data_size, CHAR16 **exit_data) Print(L"Something has gone seriously wrong: %d\n", status2); Print(L"shim cannot continue, sorry.\n"); - systab->BootServices->Stall(5000000); + msleep(5000000); systab->RuntimeServices->ResetSystem( EfiResetShutdown, EFI_SECURITY_VIOLATION, 0, NULL); @@ -155,7 +152,7 @@ exit_boot_services(EFI_HANDLE image_key, UINTN map_key) Print(L"Bootloader has not verified loaded image.\n"); Print(L"System is compromised. halting.\n"); - systab->BootServices->Stall(5000000); + msleep(5000000); systab->RuntimeServices->ResetSystem(EfiResetShutdown, EFI_SECURITY_VIOLATION, 0, NULL); return EFI_SECURITY_VIOLATION; } @@ -177,7 +174,7 @@ do_exit(EFI_HANDLE ImageHandle, EFI_STATUS ExitStatus, Print(L"Something has gone seriously wrong: %r\n", status2); Print(L"shim cannot continue, sorry.\n"); - systab->BootServices->Stall(5000000); + msleep(5000000); systab->RuntimeServices->ResetSystem( EfiResetShutdown, EFI_SECURITY_VIOLATION, 0, NULL); -- cgit v1.2.3