2008-02-09 Robert Millan <rmh@aybabtu.com>

* normal/menu.c (run_menu): If timeout is set to zero, don't bother
        drawing the menu.
This commit is contained in:
robertmh 2008-02-09 11:00:19 +00:00
parent 3dac2e3fdd
commit c196216293
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-02-09 Robert Millan <rmh@aybabtu.com>
* normal/menu.c (run_menu): If timeout is set to zero, don't bother
drawing the menu.
2008-02-09 Robert Millan <rmh@aybabtu.com>
* commands/sleep.c: New file.

View file

@ -339,6 +339,10 @@ run_menu (grub_menu_t menu, int nested)
if (default_entry < 0 || default_entry >= menu->size)
default_entry = 0;
/* If timeout is 0, drawing is pointless (and ugly). */
if (get_timeout () == 0)
return default_entry;
offset = default_entry;
if (offset > GRUB_TERM_NUM_ENTRIES - 1)
{