]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 13 Feb 2010 15:40:29 +0000 (16:40 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 13 Feb 2010 15:40:29 +0000 (16:40 +0100)
* term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Macroify
constants.

ChangeLog
term/ieee1275/ofconsole.c

index 01067182ff668e4a64c6ca1c1f0450dbc61c252b..ff5621a56ff19a4611bbefe92f0f285df2798193 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-13  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Macroify
+       constants.
+
 2010-02-13  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * loader/sparc64/ieee1275/linux.c (align_addr): Remove.
index 51dca7a53c217a48357508476d2e0d7971966e70..6073e25d26216fbb5e50fbf0d96f2bbb9a58c189 100644 (file)
@@ -165,7 +165,7 @@ grub_ofconsole_readkey (int *key)
          return 1;
        }
 
-      if (c != 91)
+      if (c != '[')
        return 0;
 
       grub_ieee1275_read (stdin_ihandle, &c, 1, &actual);
@@ -174,21 +174,21 @@ grub_ofconsole_readkey (int *key)
 
       switch (c)
        {
-       case 65:
+       case 'A':
          /* Up: Ctrl-p.  */
-         c = 16;
+         c = GRUB_TERM_UP;
          break;
-       case 66:
+       case 'B':
          /* Down: Ctrl-n.  */
-         c = 14;
+         c = GRUB_TERM_DOWN;
          break;
-       case 67:
+       case 'C':
          /* Right: Ctrl-f.  */
-         c = 6;
+         c = GRUB_TERM_RIGHT;
          break;
-       case 68:
+       case 'D':
          /* Left: Ctrl-b.  */
-         c = 2;
+         c = GRUB_TERM_LEFT;
          break;
        }
     }