aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-01-09 12:30:55 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-01-09 12:30:55 +0000
commit75148dfbf2650e287c3d0ca690591f27910ffd04 (patch)
treefb5c179d2907b95ee3cb48ae01b82b492deb9f1f
parent168255dc63b68714e8296bee38dec09906c9a1ec (diff)
downloadsyslinux-75148dfbf2650e287c3d0ca690591f27910ffd04.tar.gz
syslinux-75148dfbf2650e287c3d0ca690591f27910ffd04.tar.xz
syslinux-75148dfbf2650e287c3d0ca690591f27910ffd04.zip
efi: Fix handling of "extended" keys
If we're using the scancode we need to put it in 'hi', which isn't subject to processing the same way that the return value of efi_getchar() is. This mimics the way that the BIOS version works. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--efi/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/efi/main.c b/efi/main.c
index 9974c039..bb13672a 100644
--- a/efi/main.c
+++ b/efi/main.c
@@ -250,14 +250,14 @@ char efi_getchar(char *hi)
if (seq_len) {
/* We are in the middle of key sequence for the scan code */
- c = *key_seq++;
+ *hi = *key_seq++;
seq_len--;
if (!seq_len) {
/* end of key sequene, reset state */
seq_len = 0;
key_seq = NULL;
}
- return c;
+ return 0;
}
/* Fresh key processing */
do {
@@ -272,7 +272,8 @@ char efi_getchar(char *hi)
key_seq = (char *)keycodes[key.ScanCode-1].seq;
seq_len = keycodes[key.ScanCode-1].seqlen;
seq_len--;
- c = *key_seq++;
+ *hi = *key_seq++;
+ c = 0;
} else c = '\0';
return c;