I'm looking in the manual and I felt error reporting needed a minor
change.
Rationale: stage-1.5 errors must be ordered numerically (in the docs),
so the user finds them. But stage-2 errors should be order alphabetically,
otherwise the user must do an exhaustive search.
Thus, in stage 2 I think
Error 21: Selected disk does not exist
is better than
Error: Selected disk does not exist
And in stage 1.5 I think
Error 21
is better than
Error: 21
Also, the extra \n at the head of stage2 errors is wasting one screen line.
The patch is two lines, but I synced the docs to the new behaviour as well.
I tested both the grub shell and info/dvi docs after the change.
--- ./stage2/char_io.c.orig Sat Sep 2 15:55:10 2000
+++ ./stage2/char_io.c Sat Sep 2 15:56:52 2000
@@ -31,9 +31,9 @@
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 ("Error %u: %s\n", errnum, err_list[errnum]);
#else /* STAGE1_5 */
- printf ("Error: %u\n", errnum);
+ printf ("Error %u\n", errnum);
#endif /* STAGE1_5 */
}
--- ./docs/user-ref.texi.orig Sat Sep 2 15:57:31 2000
+++ ./docs/user-ref.texi Sat Sep 2 16:01:51 2000
@@ -1130,24 +1130,24 @@
@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
@section Errors reported by the Stage 2
The general way that the Stage 2 handles errors is to abort the
-operation in question, print an error string, then (if possible) either
+operation in question, print an error number and associated
+string, then (if possible) either
continue based on the fact that an error occurred or wait for the user to
deal with the error.
-The following is a comprehensive list of error messages for the Stage 2
-(error numbers for the Stage 1.5 are listed before the colon in each
-description):
+The following is a comprehensive list of error messages for the Stage 2.
+Errors reported by the Stage 1.5 use the same number codes.
@table @asis
@item 1 : Filename must be either an absolute filename or blocklist