Skip to content

Commit

Permalink
shim: Don't stop forever at "Secure Boot not enabled" notification
Browse files Browse the repository at this point in the history
Requesting a keystroke when Secure Boot is not enabled and verbosity is
enabled is really annoying.

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
  • Loading branch information
rmetrich authored and vathpela committed Dec 10, 2021
1 parent 4804ba0 commit 0dd4c78
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,11 @@ BOOLEAN secure_mode (void)
return FALSE;

if (variable_is_secureboot() != 1) {
if (verbose && !in_protocol && first)
console_notify(L"Secure boot not enabled");
if (verbose && !in_protocol && first) {
CHAR16 *title = L"Secure boot not enabled";
CHAR16 *message = L"Press any key to continue";
console_countdown(title, message, 5);
}
first = 0;
return FALSE;
}
Expand All @@ -442,8 +445,11 @@ BOOLEAN secure_mode (void)
* to consider it.
*/
if (variable_is_setupmode(0) == 1) {
if (verbose && !in_protocol && first)
console_notify(L"Platform is in setup mode");
if (verbose && !in_protocol && first) {
CHAR16 *title = L"Platform is in setup mode";
CHAR16 *message = L"Press any key to continue";
console_countdown(title, message, 5);
}
first = 0;
return FALSE;
}
Expand Down

0 comments on commit 0dd4c78

Please sign in to comment.