2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>

* term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Macroify
	constants.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-13 16:40:29 +01:00
parent 2c0fcc3666
commit 69e137e819
2 changed files with 14 additions and 9 deletions

View file

@ -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.

View 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;
}
}