[syslinux:firmware] efi: Fix handling of "extended" keys

syslinux-bot for Matt Fleming matt.fleming at intel.com
Fri Jan 11 01:33:10 PST 2013


Commit-ID:  75148dfbf2650e287c3d0ca690591f27910ffd04
Gitweb:     http://www.syslinux.org/commit/75148dfbf2650e287c3d0ca690591f27910ffd04
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Wed, 9 Jan 2013 12:30:55 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Wed, 9 Jan 2013 12:30:55 +0000

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 at intel.com>

---
 efi/main.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/efi/main.c b/efi/main.c
index 9974c03..bb13672 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;


More information about the Syslinux-commits mailing list