summaryrefslogtreecommitdiff
path: root/replacements.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-03-12 16:03:38 +0100
committerPeter Jones <pjones@redhat.com>2018-03-12 18:00:41 -0400
commit1fe31ee1b4ebf2f177d512d0301e11de0689a275 (patch)
tree50f082d81f6cab93b9394328c40f005e79e0f256 /replacements.c
parentd3b7ba1b09e64c0c17afc48270e38c364ded2cb0 (diff)
downloadefi-boot-shim-1fe31ee1b4ebf2f177d512d0301e11de0689a275.tar.gz
efi-boot-shim-1fe31ee1b4ebf2f177d512d0301e11de0689a275.zip
console: Add console_print and console_print_at helpers
This is a preparation commit for removing the setup_console(1) calls from MokManager and shim so that we don't force the EFI console to switch to text-mode. This commit replaces all direct calls to Print / PrintAt with calls to the new helpers (no functional changes) so that we can delay calling setup_console(1) till the first Print call in a follow-up patch. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'replacements.c')
-rw-r--r--replacements.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/replacements.c b/replacements.c
index 10010567..944c779d 100644
--- a/replacements.c
+++ b/replacements.c
@@ -116,9 +116,9 @@ replacement_start_image(EFI_HANDLE image_handle, UINTN *exit_data_size, CHAR16 *
EFI_STATUS efi_status2 = install_shim_protocols();
if (EFI_ERROR(efi_status2)) {
- Print(L"Something has gone seriously wrong: %r\n",
- efi_status2);
- Print(L"shim cannot continue, sorry.\n");
+ console_print(L"Something has gone seriously wrong: %r\n",
+ efi_status2);
+ console_print(L"shim cannot continue, sorry.\n");
msleep(5000000);
gRT->ResetSystem(EfiResetShutdown,
EFI_SECURITY_VIOLATION,
@@ -144,8 +144,8 @@ exit_boot_services(EFI_HANDLE image_key, UINTN map_key)
return efi_status;
}
- Print(L"Bootloader has not verified loaded image.\n");
- Print(L"System is compromised. halting.\n");
+ console_print(L"Bootloader has not verified loaded image.\n");
+ console_print(L"System is compromised. halting.\n");
msleep(5000000);
gRT->ResetSystem(EfiResetShutdown, EFI_SECURITY_VIOLATION, 0, NULL);
return EFI_SECURITY_VIOLATION;
@@ -165,9 +165,9 @@ do_exit(EFI_HANDLE ImageHandle, EFI_STATUS ExitStatus,
EFI_STATUS efi_status2 = shim_init();
if (EFI_ERROR(efi_status2)) {
- Print(L"Something has gone seriously wrong: %r\n",
- efi_status2);
- Print(L"shim cannot continue, sorry.\n");
+ console_print(L"Something has gone seriously wrong: %r\n",
+ efi_status2);
+ console_print(L"shim cannot continue, sorry.\n");
msleep(5000000);
gRT->ResetSystem(EfiResetShutdown,
EFI_SECURITY_VIOLATION, 0, NULL);