Don't display the menu if the timeout is zero.
This commit is contained in:
parent
3c0de98670
commit
cbda4d4b31
3 changed files with 42 additions and 29 deletions
|
@ -1,3 +1,9 @@
|
|||
2000-06-12 Gordon Matzigkeit <gord@fig.org>
|
||||
|
||||
* stage2/stage2.c (run_menu): Don't display the menu if the
|
||||
timeout is zero. This makes for cleaner use as a noninteractive
|
||||
bootloader.
|
||||
|
||||
2000-06-11 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
* docs/tutorial.texi (GNU/Linux): Added a caution about the
|
||||
|
|
1
TODO
1
TODO
|
@ -58,6 +58,7 @@ Priorities:
|
|||
|
||||
? Add a partition naming syntax that means ``the first partition of
|
||||
this type''. We need this for clean Hurd install floppies.
|
||||
Nope. Improving the `find' command would solve this problem.
|
||||
|
||||
* Add a real scripting language, possibly retaining backward
|
||||
compatibility so that old config files can be used.
|
||||
|
|
|
@ -182,10 +182,13 @@ run_menu (char *menu_entries, char *config_entries, int num_entries,
|
|||
restart:
|
||||
while (entryno > 11)
|
||||
{
|
||||
first_entry++;
|
||||
entryno--;
|
||||
first_entry ++;
|
||||
entryno --;
|
||||
}
|
||||
|
||||
/* Only display the menu if we're not out of time. */
|
||||
if (grub_timeout != 0)
|
||||
{
|
||||
init_page ();
|
||||
#ifndef GRUB_UTIL
|
||||
nocursor ();
|
||||
|
@ -194,29 +197,31 @@ restart:
|
|||
print_border (3, 12);
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
grub_printf ("\n
|
||||
Use the up and down arrows for selecting which entry is highlighted.\n");
|
||||
grub_printf ("\n\
|
||||
Use the up and down arrows to select which entry is highlighted.\n");
|
||||
#else
|
||||
grub_printf ("\n
|
||||
Use the %c and %c keys for selecting which entry is highlighted.\n",
|
||||
grub_printf ("\n\
|
||||
Use the %c and %c keys to select which entry is highlighted.\n",
|
||||
DISP_UP, DISP_DOWN);
|
||||
#endif
|
||||
|
||||
if (! auth && password)
|
||||
{
|
||||
printf (" Press enter to boot the selected OS or \'p\' to enter a
|
||||
printf ("\
|
||||
Press enter to boot the selected OS or \'p\' to enter a\n\
|
||||
password to unlock the next set of features.");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (config_entries)
|
||||
printf (" Press enter to boot the selected OS, \'e\' to edit the
|
||||
printf ("\
|
||||
Press enter to boot the selected OS, \'e\' to edit the\n\
|
||||
commands before booting, or \'c\' for a command-line.");
|
||||
else
|
||||
printf (
|
||||
" Press \'b\' to boot, \'e\' to edit the selected command in the
|
||||
boot sequence, \'c\' for a command-line, \'o\' to open a new line
|
||||
after (\'O\' for before) the selected line, \'d\' to remove the
|
||||
printf ("\
|
||||
Press \'b\' to boot, \'e\' to edit the selected command in the\n\
|
||||
boot sequence, \'c\' for a command-line, \'o\' to open a new line\n\
|
||||
after (\'O\' for before) the selected line, \'d\' to remove the\n\
|
||||
selected line, or escape to go back to the main menu.");
|
||||
}
|
||||
|
||||
|
@ -224,6 +229,7 @@ restart:
|
|||
|
||||
/* highlight initial line */
|
||||
set_line_highlight (4 + entryno);
|
||||
}
|
||||
|
||||
/* XX using RT clock now, need to initialize value */
|
||||
while ((time1 = getrtsecs()) == 0xFF);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue