Fix bugs in grub_getkey introduced in previous commit

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-08-23 13:12:29 +02:00
parent 9518e2a12b
commit 071b673a7b

View file

@ -104,15 +104,19 @@ grub_checkkey (void)
int
grub_getkey (void)
{
int ret;
grub_refresh ();
while (pending_key != GRUB_TERM_NO_KEY)
grub_checkkey ();
while (pending_key == GRUB_TERM_NO_KEY)
{
grub_cpu_idle ();
grub_checkkey ();
}
ret = pending_key;
pending_key = GRUB_TERM_NO_KEY;
return pending_key;
return ret;
}