diff options
| author | Peter Jones <pjones@redhat.com> | 2017-08-31 14:48:55 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2017-08-31 15:13:34 -0400 |
| commit | 78f6b007e7138df347cb9c527f1ebe01a32cfe3d (patch) | |
| tree | 0e22138044dd4baddf9b683afed94685e966b9c3 /replacements.c | |
| parent | 5202f80c32bdcab0469785e953bf9fa8dd4eaaa1 (diff) | |
| download | efi-boot-shim-78f6b007e7138df347cb9c527f1ebe01a32cfe3d.tar.gz efi-boot-shim-78f6b007e7138df347cb9c527f1ebe01a32cfe3d.zip | |
Make msleep() be a thing
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'replacements.c')
| -rw-r--r-- | replacements.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/replacements.c b/replacements.c index 01eda0e3..898b42b1 100644 --- a/replacements.c +++ b/replacements.c @@ -52,11 +52,8 @@ #include <efilib.h> #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); |
