From fd86250c1e088f68181d231448088ebc33971b33 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 8 Nov 2021 16:27:21 +0100 Subject: [PATCH] sd-boot: Always add TextInputEx to wait queue if available --- src/boot/efi/console.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/boot/efi/console.c b/src/boot/efi/console.c index 6b71e1e02c1..6e76745cc61 100644 --- a/src/boot/efi/console.c +++ b/src/boot/efi/console.c @@ -52,12 +52,12 @@ EFI_STATUS console_key_read(UINT64 *key, UINT64 timeout_usec) { /* If WaitForKeyEx fails here, the firmware pretends it talks this * protocol, but it really doesn't. */ TextInputEx = NULL; - else - events[n_events++] = TextInputEx->WaitForKeyEx; - checked = TRUE; } + if (TextInputEx) + events[n_events++] = TextInputEx->WaitForKeyEx; + err = BS->CreateEvent(EVT_TIMER, 0, NULL, NULL, &timer); if (EFI_ERROR(err)) return log_error_status_stall(err, L"Error creating timer event: %r", err); -- 2.47.3