Don't treat UnicodeChar == 0 as a keyboard input.
authoryasuoka <yasuoka@openbsd.org>
Fri, 24 Aug 2018 01:42:41 +0000 (01:42 +0000)
committeryasuoka <yasuoka@openbsd.org>
Fri, 24 Aug 2018 01:42:41 +0000 (01:42 +0000)
This fixes the problem that which prevents typing the passpharase for
softraid on boot.  It happened at least with some external keyboards
on ThinkPad X2{6,8}0.  diff from Frank Groeneveld

ok tb

sys/arch/amd64/stand/efiboot/efiboot.c

index 2f4a01e..6f8212c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: efiboot.c,v 1.30 2018/07/06 07:55:50 yasuoka Exp $    */
+/*     $OpenBSD: efiboot.c,v 1.31 2018/08/24 01:42:41 yasuoka Exp $    */
 
 /*
  * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -494,7 +494,7 @@ efi_cons_getc(dev_t dev)
        }
 
        status = EFI_CALL(conin->ReadKeyStroke, conin, &key);
-       while (status == EFI_NOT_READY) {
+       while (status == EFI_NOT_READY || key.UnicodeChar == 0) {
                if (dev & 0x80)
                        return (0);
                EFI_CALL(BS->WaitForEvent, 1, &conin->WaitForKey, &dummy);