2009-09-24 Robert Millan <rmh.grub@aybabtu.com>
Fix "lost keypress" bug in at_keyboard. * term/i386/pc/at_keyboard.c (grub_at_keyboard_checkkey): New function. Checks for readyness of input buffer (without flushing it). (grub_at_keyboard_term): Use grub_at_keyboard_checkkey() rather than grub_at_keyboard_getkey_noblock() for `checkkey' struct member.
This commit is contained in:
parent
c6dcedf6b2
commit
4e5a02a7ba
2 changed files with 17 additions and 2 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2009-09-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Fix "lost keypress" bug in at_keyboard.
|
||||||
|
|
||||||
|
* term/i386/pc/at_keyboard.c (grub_at_keyboard_checkkey): New function.
|
||||||
|
Checks for readyness of input buffer (without flushing it).
|
||||||
|
(grub_at_keyboard_term): Use grub_at_keyboard_checkkey() rather
|
||||||
|
than grub_at_keyboard_getkey_noblock() for `checkkey' struct member.
|
||||||
|
|
||||||
2009-09-24 Robert Millan <rmh.grub@aybabtu.com>
|
2009-09-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
* util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
|
* util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
|
||||||
|
|
|
@ -189,6 +189,13 @@ grub_at_keyboard_getkey_noblock (void)
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
grub_at_keyboard_checkkey (void)
|
||||||
|
{
|
||||||
|
/* FIXME: this will be triggered by BREAK events. */
|
||||||
|
return KEYBOARD_ISREADY (grub_inb (KEYBOARD_REG_STATUS)) ? 1 : -1;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
grub_at_keyboard_getkey (void)
|
grub_at_keyboard_getkey (void)
|
||||||
{
|
{
|
||||||
|
@ -220,8 +227,7 @@ static struct grub_term_input grub_at_keyboard_term =
|
||||||
.name = "at_keyboard",
|
.name = "at_keyboard",
|
||||||
.init = grub_keyboard_controller_init,
|
.init = grub_keyboard_controller_init,
|
||||||
.fini = grub_keyboard_controller_fini,
|
.fini = grub_keyboard_controller_fini,
|
||||||
/* FIXME: This routine flushes input buffer, and it shouldn't. */
|
.checkkey = grub_at_keyboard_checkkey,
|
||||||
.checkkey = grub_at_keyboard_getkey_noblock,
|
|
||||||
.getkey = grub_at_keyboard_getkey,
|
.getkey = grub_at_keyboard_getkey,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue