2008-05-16 Christian Franke <franke@computer.org>
* commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue to ensure that break with ESC will always work. * commands/sleep.c (grub_interruptible_millisleep): Likewise. Remove ESC from keyboard queue.
This commit is contained in:
parent
eedf167fef
commit
b7c6bed50e
3 changed files with 15 additions and 7 deletions
|
@ -52,7 +52,8 @@ grub_interruptible_millisleep (grub_uint32_t ms)
|
|||
end_at = grub_get_rtc () + grub_div_roundup (ms * GRUB_TICKS_PER_SECOND, 1000);
|
||||
|
||||
while (grub_get_rtc () < end_at)
|
||||
if (GRUB_TERM_ASCII_CHAR (grub_checkkey ()) == GRUB_TERM_ESC)
|
||||
if (grub_checkkey () >= 0 &&
|
||||
GRUB_TERM_ASCII_CHAR (grub_getkey ()) == GRUB_TERM_ESC)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue