grub/grub-core
Michael Bideau 33203ca348 at_keyboard: Fix unreliable key presses
This patch fixes an issue that prevented the at_keyboard module to work
(for me). The cause was a bad/wrong return value in the
grub_at_keyboard_getkey() function in grub-core/term/at_keyboard.c file
at line 237. My symptoms were to have an unresponsive keyboard. Keys
needed to be pressed 10x and more to effectively be printed sometimes
generating multiple key presses (after 1 or 2 sec of no printing). It
was very problematic when typing passphrase in early stage (with
GRUB_ENABLE_CRYPTODISK). When switched to "console" terminal input
keyboard worked perfectly. It also worked great with the GRUB 2.02
packaged by Debian (2.02+dfsg1-20). It was not an output issue but an
input one.

I've managed to analyze the issue and found that it came from the commit
216950a4e (at_keyboard: Split protocol from controller code.). Three
lines where moved from the fetch_key() function in
grub-core/term/at_keyboard.c file to the beginning of
grub_at_keyboard_getkey() function (same file). However, returning -1
made sense when it happened in fetch_key() function but not anymore in
grub_at_keyboard_getkey() function which should return GRUB_TERM_NO_KEY.
I think it was just an incomplete cut-paste missing a small manual
correction. Let's fix it.

Note: Commit message updated by Daniel Kiper.

Signed-off-by: Michael Bideau <mica.devel@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2019-10-21 14:07:47 +02:00
..
boot A workaround for clang problem assembling startup_raw.S 2019-04-08 15:22:10 +10:00
bus ehci: Fix compilation on i386 2017-07-09 21:31:19 +02:00
commands probe: Support probing for msdos PARTUUID 2019-10-21 14:00:54 +02:00
disk efidisk: NULL pointer dereference in grub_efidisk_get_device_name() 2019-04-02 13:09:08 +02:00
efiemu smbios: Add a module for retrieving SMBIOS information 2019-07-11 21:06:12 +02:00
font verifiers: File type for fine-grained signature-verification controlling 2018-11-09 13:25:31 +01:00
fs f2fs: Disable gcc9 -Waddress-of-packed-member 2019-06-03 11:18:31 +02:00
gdb i386, x86_64, ppc: fix switch fallthrough cases with GCC7 2017-04-04 19:23:55 +03:00
gettext verifiers: File type for fine-grained signature-verification controlling 2018-11-09 13:25:31 +01:00
gfxmenu verifiers: File type for fine-grained signature-verification controlling 2018-11-09 13:25:31 +01:00
hello * grub-core/commands/gptsync.c: Fix typographic quoting. 2012-03-03 13:05:08 +01:00
hook * grub-core/hook/datehook.c (grub_read_hook_datetime): Small stylistic 2011-11-11 21:03:49 +01:00
io Change fs functions to add fs_ prefix 2019-04-09 10:03:29 +10:00
kern hostfs: #undef open and close. 2019-06-07 15:36:28 +02:00
lib Change fs functions to add fs_ prefix 2019-04-09 10:03:29 +10:00
loader chainloader: Fix gcc9 error -Waddress-of-packed-member 2019-04-23 11:37:08 +02:00
mmap xen: Prepare common code for Xen PVH support 2018-12-12 12:03:27 +01:00
net net: Fix crash on http 2019-09-23 13:16:48 +02:00
normal Change fs functions to add fs_ prefix 2019-04-09 10:03:29 +10:00
osdep verifiers: Blocklist fallout cleanup 2019-07-11 18:06:23 +02:00
partmap msdos: Fix overflow in converting partition start and length into 512B blocks 2018-09-27 14:56:45 +02:00
parttool * grub-core/net/http.c: Add TRANSLATORS comments. 2012-03-05 16:42:26 +01:00
script verifiers: Verify commands executed by grub 2018-12-12 13:17:52 +01:00
term at_keyboard: Fix unreliable key presses 2019-10-21 14:07:47 +02:00
tests Regenerate checksum.h with newer unifont. 2017-08-30 17:12:04 +02:00
video video: skip 'text' gfxpayload if not supported, to fallback to default 2019-05-20 13:00:44 +02:00
gdb_grub.in * grub-core/gdb_grub.in: Fix overflow and wrong field. 2013-10-14 03:40:20 +02:00
genemuinit.sh use MODULE_FILES for genemuinit* instead of MOD_FILES 2014-01-18 23:15:40 +04:00
genemuinitheader.sh use MODULE_FILES for genemuinit* instead of MOD_FILES 2014-01-18 23:15:40 +04:00
genmod.sh.in .mod files: Strip annobin annotations and .eh_frame, and their relocations 2018-03-05 14:08:22 +01:00
genmoddep.awk enforcing fixup 2017-08-14 16:27:10 +02:00
gensyminfo.sh.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
gensymlist.sh Make 'make check' work on emu. 2013-04-27 02:00:16 +02:00
gentrigtables.c * grub-core/gentrigtables.c: Make tables const. 2013-03-01 11:15:09 +01:00
gmodule.pl.in * grub-core/gmodule.pl.in: Accept newer binutils which output 2014-09-21 18:23:23 +02:00
Makefile.am RISC-V: Add to build system 2019-02-25 14:02:05 +01:00
Makefile.core.def smbios: Add a module for retrieving SMBIOS information 2019-07-11 21:06:12 +02:00
modinfo.sh.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00