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

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