Date: Sun, 22 Dec 2019 20:36:57 +0000 (UTC) From: Toomas Soome <tsoome@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356027 - stable/12/stand/efi/libefi Message-ID: <201912222036.xBMKavmR077734@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tsoome Date: Sun Dec 22 20:36:57 2019 New Revision: 356027 URL: https://svnweb.freebsd.org/changeset/base/356027 Log: MFC r355844: loader.efi: efi_readkey_ex needs to key despite the shift status or toggle status From UEFI specification 2.8, page 434: "It should also be noted that certain input devices may not be able to produce shift or toggle state information, and in those cases the high order bit in the respective Toggle and Shift state fields should not be active." But we still need to check for ScanCode and UnicodeChar. PR: 242660 Modified: stable/12/stand/efi/libefi/efi_console.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/efi/libefi/efi_console.c ============================================================================== --- stable/12/stand/efi/libefi/efi_console.c Sun Dec 22 20:35:50 2019 (r356026) +++ stable/12/stand/efi/libefi/efi_console.c Sun Dec 22 20:36:57 2019 (r356027) @@ -558,11 +558,15 @@ efi_readkey_ex(void) kp->UnicodeChar++; } } - if (kp->ScanCode == 0 && kp->UnicodeChar == 0) - return (false); - keybuf_inschar(kp); - return (true); } + /* + * The shift state and/or toggle state may not be valid, + * but we still can have ScanCode or UnicodeChar. + */ + if (kp->ScanCode == 0 && kp->UnicodeChar == 0) + return (false); + keybuf_inschar(kp); + return (true); } return (false); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912222036.xBMKavmR077734>