Blame SOURCES/0048-grub-core-term-at_keyboard.c-Tolerate-missing-keyboa.patch

d41074
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a85e8e
From: Vladimir Serbinenko <phcoder@gmail.com>
a85e8e
Date: Sun, 26 Jan 2014 03:31:10 +0100
d41074
Subject: [PATCH] * grub-core/term/at_keyboard.c: Tolerate missing keyboard.
a85e8e
a85e8e
---
a85e8e
 grub-core/term/at_keyboard.c | 3 +++
d41074
 ChangeLog                    | 4 ++++
a85e8e
 2 files changed, 7 insertions(+)
a85e8e
a85e8e
diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
d41074
index f5071ce69e8..b4257e84a04 100644
a85e8e
--- a/grub-core/term/at_keyboard.c
a85e8e
+++ b/grub-core/term/at_keyboard.c
a85e8e
@@ -396,6 +396,9 @@ fetch_key (int *is_break)
a85e8e
   if (! KEYBOARD_ISREADY (grub_inb (KEYBOARD_REG_STATUS)))
a85e8e
     return -1;
a85e8e
   at_key = grub_inb (KEYBOARD_REG_DATA);
a85e8e
+  /* May happen if no keyboard is connected. Just ignore this.  */
a85e8e
+  if (at_key == 0xff)
a85e8e
+    return -1;
a85e8e
   if (at_key == 0xe0)
a85e8e
     {
a85e8e
       e0_received = 1;
d41074
diff --git a/ChangeLog b/ChangeLog
d41074
index bbec1e70bbd..d37d4a6fc16 100644
d41074
--- a/ChangeLog
d41074
+++ b/ChangeLog
d41074
@@ -1,3 +1,7 @@
d41074
+2014-01-26  Vladimir Serbinenko  <phcoder@gmail.com>
d41074
+
d41074
+	* grub-core/term/at_keyboard.c: Tolerate missing keyboard.
d41074
+
d41074
 2014-01-26  Mike Gilbert <floppym@gentoo.org>
d41074
 
d41074
 	grub-install: support for partitioned partx loop devices.