diff options
| author | Peter Jones <pjones@redhat.com> | 2013-10-04 10:22:46 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2013-10-04 11:51:09 -0400 |
| commit | 880f9de4123561d18e5c230b4f6e614c5eab960d (patch) | |
| tree | 6523f2c69fb7264d2c8738222f2ede91b534e60e /lib/console.c | |
| parent | 53a318f52eb3f26c43a27d81dacc8ed9200f2dcc (diff) | |
| download | efi-boot-shim-880f9de4123561d18e5c230b4f6e614c5eab960d.tar.gz efi-boot-shim-880f9de4123561d18e5c230b4f6e614c5eab960d.zip | |
Try to actually make debug printing look reasonable.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'lib/console.c')
| -rw-r--r-- | lib/console.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/lib/console.c b/lib/console.c index 44b08f25..1f8f59ca 100644 --- a/lib/console.c +++ b/lib/console.c @@ -8,6 +8,7 @@ #include <efi/efilib.h> #include <console.h> +#include <variables.h> #include <errors.h> static int min(int a, int b) @@ -312,20 +313,6 @@ console_notify(CHAR16 *string) console_alertbox(str_arr); } -void -console_notify_ascii(CHAR8 *string) -{ - CHAR16 *str = AllocateZeroPool((strlena(string) + 1) * 2); - int i, j; - - if (!str) - return; - - for (i = 0, j = 1; string[i] != '\0'; i++, j+=2) - str[j] = string[i]; - console_notify(str); -} - #define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) /* Copy of gnu-efi-3.0 with the added secure boot strings */ @@ -416,6 +403,24 @@ console_reset(void) uefi_call_wrapper(co->ClearScreen, 1, co); } +UINT8 verbose; + +VOID +setup_verbosity(VOID) +{ + EFI_STATUS status; + EFI_GUID global_var = EFI_GLOBAL_VARIABLE; + UINT8 verbose_check; + UINTN verbose_check_size; + + verbose_check_size = 1; + status = get_variable(L"SHIM_VERBOSE", (void *)&verbose_check, + &verbose_check_size, global_var); + verbose = 0; + if (!EFI_ERROR(status)) + verbose = verbose_check; +} + VOID setup_console (int text) { EFI_STATUS status; |
