From 34f0c4abc0a0e43656155be587428639bbf87710 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Thu, 18 Oct 2012 17:43:53 -0400 Subject: [PATCH] Clear screen before prompting We were drawing prompts on top of existing text, which was less than ideal. --- MokManager.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MokManager.c b/MokManager.c index bc62cd0..08e1d36 100644 --- a/MokManager.c +++ b/MokManager.c @@ -708,6 +708,8 @@ static INTN mok_sb_prompt (void *MokSB, void *data2, void *data3) { return -1; } + uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); + while (fail_count < 3) { Print(L"Enter Secure Boot passphrase: "); get_line(&length, password, SB_PASSWORD_LEN, 0); @@ -797,6 +799,8 @@ static INTN mok_pw_prompt (void *MokPW, void *data2, void *data3) { LibDeleteVariable(L"MokPW", &shim_lock_guid); + uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); + while (fail_count < 3) { Print(L"Confirm MOK passphrase: "); get_line(&length, password, PASSWORD_MAX, 0); @@ -1453,6 +1457,8 @@ static BOOLEAN verify_pw(void) if (attributes & EFI_VARIABLE_RUNTIME_ACCESS) return TRUE; + uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); + while (fail_count < 3) { Print(L"Enter MOK password: "); get_line(&length, password, PASSWORD_MAX, 0);