From: Sam Morris <sam@robots.org.uk>
To: grub-devel@lists.gnu.org
Subject: [PATCH] tell the user why they are in rescue mode
Date: Thu, 07 Feb 2008 18:34:26 +0000 [thread overview]
Message-ID: <1202409267.5010.2.camel@xerces> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 315 bytes --]
Here's a patch that explains to the user why they are being sent to
rescue mode in cast normal mode fails.
I've also corrected a grammatical error in the 'entering rescue mode'
message.
--
Sam Morris
http://robots.org.uk/
PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B C869 B219 7FDB 5EA0 1078
[-- Attachment #1.2: verbose_error.patch --]
[-- Type: text/x-patch, Size: 1284 bytes --]
diff -ru grub2-1.96+20080203+orig/kern/main.c grub2-1.96+20080203+sam/kern/main.c
--- grub2-1.96+20080203+orig/kern/main.c 2008-01-05 12:04:35.000000000 +0000
+++ grub2-1.96+20080203+sam/kern/main.c 2008-02-07 08:41:01.000000000 +0000
@@ -102,8 +102,13 @@
/* Load the module. */
grub_dl_load ("normal");
- /* Ignore any error, because we have the rescue mode anyway. */
- grub_errno = GRUB_ERR_NONE;
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_printf ("Unable to enter 'normal' mode (error %d: %s)\n", grub_errno, grub_errmsg);
+
+ /* We're about to continue into rescue mode, so clear the error. */
+ grub_errno = GRUB_ERR_NONE;
+ }
}
/* The main routine. */
diff -ru grub2-1.96+20080203+orig/kern/rescue.c grub2-1.96+20080203+sam/kern/rescue.c
--- grub2-1.96+20080203+orig/kern/rescue.c 2008-01-30 14:42:09.000000000 +0000
+++ grub2-1.96+20080203+sam/kern/rescue.c 2008-02-07 08:38:46.000000000 +0000
@@ -618,7 +618,7 @@
/* First of all, attempt to execute the normal mode. */
attempt_normal_mode ();
- grub_printf ("Entering into rescue mode...\n");
+ grub_printf ("Entering rescue mode...\n");
grub_rescue_register_command ("boot", grub_rescue_cmd_boot,
"boot an operating system");
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2008-02-08 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-07 18:34 Sam Morris [this message]
2008-02-08 1:10 ` [PATCH] tell the user why they are in rescue mode Robert Millan
2008-02-08 18:44 ` Sam Morris
2008-02-08 19:15 ` Robert Millan
2008-02-09 15:42 ` Sam Morris
2008-02-10 17:08 ` Robert Millan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1202409267.5010.2.camel@xerces \
--to=sam@robots.org.uk \
--cc=grub-devel@gnu.org \
--cc=grub-devel@lists.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.