grub2/0105-grub-core-commands-keylayouts.c-Ignore-unknown-keys.patch
Peter Jones 8c6b1ac71e Reconcile with upstream once again.
Also include some minor fixes for gcc 5.1.1

Signed-off-by: Peter Jones <pjones@redhat.com>
2015-07-22 09:46:32 -04:00

45 lines
1.3 KiB
Diff

From 7c378c3964a19ae6da0648ca18cf37308b072629 Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder@gmail.com>
Date: Sun, 21 Sep 2014 18:49:49 +0200
Subject: [PATCH 105/506] * grub-core/commands/keylayouts.c: Ignore
unknown keys.
---
ChangeLog | 4 ++++
grub-core/commands/keylayouts.c | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 163265b..6d4e295 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2014-09-21 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/commands/keylayouts.c: Ignore unknown keys.
+
+2014-09-21 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/gmodule.pl.in: Accept newer binutils which output
empty column rather than 0x0.
diff --git a/grub-core/commands/keylayouts.c b/grub-core/commands/keylayouts.c
index da04389..f4b7730 100644
--- a/grub-core/commands/keylayouts.c
+++ b/grub-core/commands/keylayouts.c
@@ -173,8 +173,10 @@ grub_term_map_key (grub_keyboard_key_t code, int status)
key = map_key_core (code, status, &alt_gr_consumed);
- if (key == 0 || key == GRUB_TERM_SHIFT)
+ if (key == 0 || key == GRUB_TERM_SHIFT) {
grub_printf ("Unknown key 0x%x detected\n", code);
+ return GRUB_TERM_NO_KEY;
+ }
if (status & GRUB_TERM_STATUS_CAPS)
{
--
2.4.3