From 41be16891924eb7db6e5a3d994f8405f3e64ab2e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 5 Apr 2018 13:50:18 -0400 Subject: Make setup_console(-1) do GetMode() and call it from setup_verbosity() Signed-off-by: Peter Jones --- lib/console.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/console.c b/lib/console.c index 3d28daaf..12f48b08 100644 --- a/lib/console.c +++ b/lib/console.c @@ -68,6 +68,13 @@ static VOID setup_console (int text) /* If that didn't work, assume it's graphics */ if (EFI_ERROR(efi_status)) mode = EfiConsoleControlScreenGraphics; + if (text < 0) { + if (mode == EfiConsoleControlScreenGraphics) + console_text_mode = 0; + else + console_text_mode = 1; + return; + } } else { new_mode = mode; } @@ -510,6 +517,8 @@ setup_verbosity(VOID) verbose = 0; if (!EFI_ERROR(efi_status)) verbose = verbose_check; + + setup_console(-1); } /* Included here because they mess up the definition of va_list and friends */ -- cgit v1.2.3