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>
|
2000-06-11 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
* docs/tutorial.texi (GNU/Linux): Added a caution about the
|
* 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
|
? Add a partition naming syntax that means ``the first partition of
|
||||||
this type''. We need this for clean Hurd install floppies.
|
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
|
* Add a real scripting language, possibly retaining backward
|
||||||
compatibility so that old config files can be used.
|
compatibility so that old config files can be used.
|
||||||
|
|
|
@ -182,49 +182,55 @@ run_menu (char *menu_entries, char *config_entries, int num_entries,
|
||||||
restart:
|
restart:
|
||||||
while (entryno > 11)
|
while (entryno > 11)
|
||||||
{
|
{
|
||||||
first_entry++;
|
first_entry ++;
|
||||||
entryno--;
|
entryno --;
|
||||||
}
|
}
|
||||||
|
|
||||||
init_page ();
|
/* Only display the menu if we're not out of time. */
|
||||||
|
if (grub_timeout != 0)
|
||||||
|
{
|
||||||
|
init_page ();
|
||||||
#ifndef GRUB_UTIL
|
#ifndef GRUB_UTIL
|
||||||
nocursor ();
|
nocursor ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
print_border (3, 12);
|
print_border (3, 12);
|
||||||
|
|
||||||
#ifdef GRUB_UTIL
|
#ifdef GRUB_UTIL
|
||||||
grub_printf ("\n
|
grub_printf ("\n\
|
||||||
Use the up and down arrows for selecting which entry is highlighted.\n");
|
Use the up and down arrows to select which entry is highlighted.\n");
|
||||||
#else
|
#else
|
||||||
grub_printf ("\n
|
grub_printf ("\n\
|
||||||
Use the %c and %c keys for selecting which entry is highlighted.\n",
|
Use the %c and %c keys to select which entry is highlighted.\n",
|
||||||
DISP_UP, DISP_DOWN);
|
DISP_UP, DISP_DOWN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (! auth && password)
|
if (! auth && password)
|
||||||
{
|
{
|
||||||
printf (" Press enter to boot the selected OS or \'p\' to enter a
|
printf ("\
|
||||||
password to unlock the next set of features.");
|
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
|
|
||||||
commands before booting, or \'c\' for a command-line.");
|
|
||||||
else
|
else
|
||||||
printf (
|
{
|
||||||
" Press \'b\' to boot, \'e\' to edit the selected command in the
|
if (config_entries)
|
||||||
boot sequence, \'c\' for a command-line, \'o\' to open a new line
|
printf ("\
|
||||||
after (\'O\' for before) the selected line, \'d\' to remove the
|
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\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.");
|
selected line, or escape to go back to the main menu.");
|
||||||
|
}
|
||||||
|
|
||||||
|
print_entries (3, 12, first_entry, menu_entries);
|
||||||
|
|
||||||
|
/* highlight initial line */
|
||||||
|
set_line_highlight (4 + entryno);
|
||||||
}
|
}
|
||||||
|
|
||||||
print_entries (3, 12, first_entry, menu_entries);
|
|
||||||
|
|
||||||
/* highlight initial line */
|
|
||||||
set_line_highlight (4 + entryno);
|
|
||||||
|
|
||||||
/* XX using RT clock now, need to initialize value */
|
/* XX using RT clock now, need to initialize value */
|
||||||
while ((time1 = getrtsecs()) == 0xFF);
|
while ((time1 = getrtsecs()) == 0xFF);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue