diff options
| author | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2017-09-13 12:09:40 -0700 |
|---|---|---|
| committer | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2017-09-13 12:09:40 -0700 |
| commit | b6f94dbeacfc6f0a507413096189304c58dbe66c (patch) | |
| tree | bce8c7db22209078618294c51d95a0c033aec7d9 /replacements.c | |
| parent | 25f7fd1fb389a5f6356f353d16c5ead80dac6bbc (diff) | |
| download | efi-boot-shim-b6f94dbeacfc6f0a507413096189304c58dbe66c.tar.gz efi-boot-shim-b6f94dbeacfc6f0a507413096189304c58dbe66c.zip | |
New upstream version 13~git1505328970.9c1c35c5upstream/13_git1505328970.9c1c35c5
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); |
