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

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