]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Correctly check the return value of CheckEvent
authorJan Janssen <medhefgo@web.de>
Fri, 11 Feb 2022 12:17:23 +0000 (13:17 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 11 Feb 2022 17:07:05 +0000 (17:07 +0000)
Fixes: #22428
src/boot/efi/console.c

index 3a0cf535e15c995e878b626057628febb545ca2d..cd5c8b63480eb9041595cf6b3851f902469832ff 100644 (file)
@@ -147,7 +147,7 @@ EFI_STATUS console_key_read(UINT64 *key, UINT64 timeout_usec) {
                 }
 
                 return EFI_NOT_READY;
-        } else if (BS->CheckEvent(ST->ConIn->WaitForKey)) {
+        } else if (!EFI_ERROR(BS->CheckEvent(ST->ConIn->WaitForKey))) {
                 EFI_INPUT_KEY k;
 
                 err = ST->ConIn->ReadKeyStroke(ST->ConIn, &k);