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

6b3c76
From c10ca57b760978f32d1d34d78cda9fd57e1e0bfa Mon Sep 17 00:00:00 2001
a85e8e
From: Vladimir Serbinenko <phcoder@gmail.com>
a85e8e
Date: Sun, 26 Jan 2014 03:31:10 +0100
6b3c76
Subject: [PATCH 048/261] * grub-core/term/at_keyboard.c: Tolerate missing
6b3c76
 keyboard.
a85e8e
a85e8e
---
d41074
 ChangeLog                    | 4 ++++
6b3c76
 grub-core/term/at_keyboard.c | 3 +++
a85e8e
 2 files changed, 7 insertions(+)
a85e8e
6b3c76
diff --git a/ChangeLog b/ChangeLog
6b3c76
index bbec1e70b..d37d4a6fc 100644
6b3c76
--- a/ChangeLog
6b3c76
+++ b/ChangeLog
6b3c76
@@ -1,3 +1,7 @@
6b3c76
+2014-01-26  Vladimir Serbinenko  <phcoder@gmail.com>
6b3c76
+
6b3c76
+	* grub-core/term/at_keyboard.c: Tolerate missing keyboard.
6b3c76
+
6b3c76
 2014-01-26  Mike Gilbert <floppym@gentoo.org>
6b3c76
 
6b3c76
 	grub-install: support for partitioned partx loop devices.
a85e8e
diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
6b3c76
index f5071ce69..b4257e84a 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;
6b3c76
-- 
6b3c76
2.13.5
6b3c76