print an error number even in Stage 2.

This commit is contained in:
okuji 2000-09-05 12:02:42 +00:00
parent 36854134df
commit 35662478d7
5 changed files with 19 additions and 7 deletions

View file

@ -1,3 +1,14 @@
2000-09-05 OKUJI Yoshinori <okuji@gnu.org>
From Alessandro Rubini <rubini@gnu.org>:
* stage2/char_io.c (print_error) [!STAGE1_5]: Print ERRNUM like
"Error 9: Unknown boot failure".
(print_error) [STAGE1_5]: Don't print a colon.
* util/grub-install.in: When checking if an error occurred, use
the expression "Error [0-9]*: " instead of "Error: ".
* docs/user-ref.texi (Stage1.5 errors): Updated, since the error
form changed.
2000-09-04 OKUJI Yoshinori <okuji@gnu.org>
* stage2/stage2.c (run_menu) [GRUB_UTIL]: Set DISP_UP and

1
THANKS
View file

@ -6,6 +6,7 @@ The following people made especially gracious contributions of their
time and energy in helping to track down bugs, add new features, and
generally assist in the GRUB maintainership process:
Alessandro Rubini <rubini@gnu.org>
Alexander K. Hudek <alexhudek@home.com>
Andrew Clausen <clausen@gnu.org>
Bradford Hovinen <hovinen@redrose.net>

View file

@ -1130,11 +1130,11 @@ the install).
@section Errors reported by the Stage 1.5
The general way that the Stage 1.5 handles errors is to print an error
number in the form @code{Error: @var{num}} and then halt. Pressing
number in the form @code{Error @var{num}} and then halt. Pressing
@kbd{@key{CTRL}-@key{ALT}-@key{DEL}} will reboot.
The error numbers correspond to the @ref{Stage2 errors} in the listed
sequence.
The error numbers correspond to the errors reported by Stage
2. @xref{Stage2 errors}.
@node Stage2 errors

View file

@ -31,9 +31,9 @@ print_error (void)
if (errnum > ERR_NONE && errnum < MAX_ERR_NUM)
#ifndef STAGE1_5
/* printf("\7\n %s\n", err_list[errnum]); */
printf ("\nError: %s\n", err_list[errnum]);
printf ("\nError %u: %s\n", errnum, err_list[errnum]);
#else /* STAGE1_5 */
printf ("Error: %u\n", errnum);
printf ("Error %u\n", errnum);
#endif /* STAGE1_5 */
}

View file

@ -200,7 +200,7 @@ else
$grub_shell --batch --device-map=$device_map <<EOF >$log_file
quit
EOF
if grep "Error: " $log_file >/dev/null; then
if grep "Error [0-9]*: " $log_file >/dev/null; then
cat $log_file 1>&2
exit 1
fi
@ -266,7 +266,7 @@ setup $force_lba --stage2=$grubdir/stage2 $install_drive
quit
EOF
if grep "Error: " $log_file >/dev/null || test $debug = yes; then
if grep "Error [0-9]*: " $log_file >/dev/null || test $debug = yes; then
cat $log_file 1>&2
exit 1
fi