On Fri, Feb 08, 2008 at 06:44:26PM +0000, Sam Morris wrote: > > While that works, the output looks like this: > > Entering rescue mode... > error: out of disk > > _ > > Which does not present the information in the clearest possible way: it > looks like the error happened in the rescue mode code, instead of the > normal mode code. > > Also, the error message could be lost if any of the code between the > start of grub_enter_rescue_mode and its call to grub_print_error itself > triggers an error. > > For these reasons I think it's better to call grub_print_error from > within grub_load_normal.
Agreed. See attached patch. Does this work as expected ? -- Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.)
2008-02-08 Robert Millan <[EMAIL PROTECTED]> * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call grub_print_error() instead. This will let user know why we're entering rescue mode. Based on suggestions from Sam Morris. diff -x configure -x config.h.in -x CVS -x '*~' -x '*.mk' -urp -N ../grub2/kern/main.c ./kern/main.c --- ../grub2/kern/main.c 2008-01-05 13:04:35.000000000 +0100 +++ ./kern/main.c 2008-02-08 20:11:52.000000000 +0100 @@ -102,8 +102,8 @@ grub_load_normal_mode (void) /* Load the module. */ grub_dl_load ("normal"); - /* Ignore any error, because we have the rescue mode anyway. */ - grub_errno = GRUB_ERR_NONE; + /* Something went wrong. Print errors here to let user know why we're entering rescue mode. */ + grub_print_error (); } /* The main routine. */
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel