2002-04-29 Yoshinori K. Okuji <okuji@enbug.org>

* stage2/builtins.c [SUPPORT_SERIAL] (terminal_func): Added a
	new option ``--silent''. This suppresses messages, if specified.
This commit is contained in:
okuji 2002-04-29 00:35:30 +00:00
parent cc7647f7d5
commit bd9abb21c5
7 changed files with 28 additions and 11 deletions

View file

@ -1,3 +1,8 @@
2002-04-29 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c [SUPPORT_SERIAL] (terminal_func): Added a
new option ``--silent''. This suppresses messages, if specified.
2002-04-29 Yoshinori K. Okuji <okuji@enbug.org> 2002-04-29 Yoshinori K. Okuji <okuji@enbug.org>
* config.guess: New upstream version. * config.guess: New upstream version.

2
NEWS
View file

@ -17,6 +17,8 @@ New in 0.92:
* The command "terminal" accepts a new option, "--lines=LINES". You can * The command "terminal" accepts a new option, "--lines=LINES". You can
set the maximum number of lines arbitrarily with this option. If you set the maximum number of lines arbitrarily with this option. If you
don't specify it, the maximum number will be 24. don't specify it, the maximum number will be 24.
* The command "terminal" accepts another new option, "--silent". You can
suppress the "Press any key to continue" message with this option.
* The mem= option for Linux is recognized and used to limit the maximum * The mem= option for Linux is recognized and used to limit the maximum
address of initrd. address of initrd.
* A fallback entry is executed immediately after a default entry, * A fallback entry is executed immediately after a default entry,

1
THANKS
View file

@ -38,6 +38,7 @@ Hal Snyder <hal@vailsys.com>
HASEGAWA Tomoki <thasegawa@mta.biglobe.ne.jp> HASEGAWA Tomoki <thasegawa@mta.biglobe.ne.jp>
Heikki Vatiainen <hessu@cs.tut.fi> Heikki Vatiainen <hessu@cs.tut.fi>
Heiko Schroeder <heiko@pool.informatik.rwth-aachen.de> Heiko Schroeder <heiko@pool.informatik.rwth-aachen.de>
Henrik Nordstrom <hno@marasystems.com>
Herbert Nachtnebel <nachtneb@iaee.tuwien.ac.at> Herbert Nachtnebel <nachtneb@iaee.tuwien.ac.at>
Hisazumi Kenji <nel@soraneko.com> Hisazumi Kenji <nel@soraneko.com>
HORIKAWA Kazunori <kaz-hori@tkd.att.ne.jp> HORIKAWA Kazunori <kaz-hori@tkd.att.ne.jp>

View file

@ -186,10 +186,10 @@ FreeBSD boot loader, and so GRUB was born.
Erich added many features to GRUB, but other priorities prevented him Erich added many features to GRUB, but other priorities prevented him
from keeping up with the demands of its quickly-expanding user base. In from keeping up with the demands of its quickly-expanding user base. In
1999, Gordon Matzigkeit and OKUJI Yoshinori adopted GRUB as an official 1999, Gordon Matzigkeit and Yoshinori K. Okuji adopted GRUB as an
GNU package, and opened its development by making the latest sources official GNU package, and opened its development by making the latest
available via anonymous CVS. @xref{Obtaining and Building GRUB}, for sources available via anonymous CVS. @xref{Obtaining and Building
more information. GRUB}, for more information.
@node Features @node Features
@ -2274,7 +2274,7 @@ character each of the symbols corresponds:
@node terminal @node terminal
@subsection terminal @subsection terminal
@deffn Command terminal [@option{--dumb}] [@option{--timeout=secs}] [@option{--lines=lines}] [@option{console}] [@option{serial}] [@option{hercules}] @deffn Command terminal [@option{--dumb}] [@option{--timeout=secs}] [@option{--lines=lines}] [@option{--silent}] [@option{console}] [@option{serial}] [@option{hercules}]
Select a terminal for user interaction. The terminal is assumed to be Select a terminal for user interaction. The terminal is assumed to be
VT100-compatible unless @option{--dumb} is specified. If both VT100-compatible unless @option{--dumb} is specified. If both
@option{console} and @option{serial} are specified, then GRUB will use @option{console} and @option{serial} are specified, then GRUB will use
@ -2291,6 +2291,9 @@ and the usage is quite similar to that for serial terminals: specify
The option @option{--lines} defines the number of lines in your The option @option{--lines} defines the number of lines in your
terminal, and it is used for the internal pager function. If you don't terminal, and it is used for the internal pager function. If you don't
specify this option, the number is assumed as 24. specify this option, the number is assumed as 24.
The option @option{--silent} suppresses the message to prompt you to
hit any key. This might be useful if your system has no terminal device.
@end deffn @end deffn
@ -3417,8 +3420,8 @@ Suppress all normal output.
@item How does GNU GRUB differ from Erich's original GRUB? @item How does GNU GRUB differ from Erich's original GRUB?
GNU GRUB is the successor of Erich's great GRUB. He couldn't work on GNU GRUB is the successor of Erich's great GRUB. He couldn't work on
GRUB because of some other tasks, so the current maintainers OKUJI GRUB because of some other tasks, so the current maintainers Yoshinori
Yoshinori and Gordon Matzigkeit took over the maintainership, and opened K. Okuji and Gordon Matzigkeit took over the maintainership, and opened
the development in order for everybody to participate it. the development in order for everybody to participate it.
Technically speaking, GNU GRUB has many features that are not seen in Technically speaking, GNU GRUB has many features that are not seen in

View file

@ -1,4 +1,4 @@
@set UPDATED 16 April 2002 @set UPDATED 29 April 2002
@set UPDATED-MONTH April 2002 @set UPDATED-MONTH April 2002
@set EDITION 0.92 @set EDITION 0.92
@set VERSION 0.92 @set VERSION 0.92

View file

@ -1,4 +1,4 @@
@set UPDATED 16 April 2002 @set UPDATED 29 April 2002
@set UPDATED-MONTH April 2002 @set UPDATED-MONTH April 2002
@set EDITION 0.92 @set EDITION 0.92
@set VERSION 0.92 @set VERSION 0.92

View file

@ -3976,6 +3976,7 @@ terminal_func (char *arg, int flags)
int dumb = 0; int dumb = 0;
int saved_terminal = terminal; int saved_terminal = terminal;
int lines = 0; int lines = 0;
int no_message = 0;
/* Get GNU-style long options. */ /* Get GNU-style long options. */
while (1) while (1)
@ -4003,6 +4004,8 @@ terminal_func (char *arg, int flags)
return 1; return 1;
} }
} }
else if (grub_memcmp (arg, "--silent", sizeof ("--silent") - 1) == 0)
no_message = 1;
else else
break; break;
@ -4113,7 +4116,9 @@ terminal_func (char *arg, int flags)
/* Prompt the user, once per sec. */ /* Prompt the user, once per sec. */
if ((time1 = getrtsecs ()) != time2 && time1 != 0xFF) if ((time1 = getrtsecs ()) != time2 && time1 != 0xFF)
{ {
if (! no_message)
grub_printf ("Press any key to continue.\n"); grub_printf ("Press any key to continue.\n");
time2 = time1; time2 = time1;
if (to > 0) if (to > 0)
to--; to--;
@ -4139,7 +4144,7 @@ static struct builtin builtin_terminal =
"terminal", "terminal",
terminal_func, terminal_func,
BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST, BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
"terminal [--dumb] [--timeout=SECS] [--lines=LINES] [console] [serial]", "terminal [--dumb] [--timeout=SECS] [--lines=LINES] [--silent] [console] [serial]",
"Select a terminal. When serial is specified, wait until you push any key" "Select a terminal. When serial is specified, wait until you push any key"
" to continue. If both console and serial are specified, the terminal" " to continue. If both console and serial are specified, the terminal"
" to which you input a key first will be selected. If no argument is" " to which you input a key first will be selected. If no argument is"
@ -4147,6 +4152,7 @@ static struct builtin builtin_terminal =
" your terminal is dumb, otherwise, vt100-compatibility is assumed." " your terminal is dumb, otherwise, vt100-compatibility is assumed."
" If --timeout is present, this command will wait at most for SECS" " If --timeout is present, this command will wait at most for SECS"
" seconds. The option --lines specifies the maximum number of lines." " seconds. The option --lines specifies the maximum number of lines."
" The option --silent is used to suppress messages."
}; };
#endif /* SUPPORT_SERIAL || SUPPORT_HERCULES */ #endif /* SUPPORT_SERIAL || SUPPORT_HERCULES */