[2156] 2009-05-02 Robert Millan <[email protected]>

Robert Millan <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2156
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2156
Author:   robertmh
Date:     2009-05-02 15:24:28 +0000 (Sat, 02 May 2009)
Log Message:
-----------
2009-05-02  Robert Millan  <[email protected]>

        * normal/menu_text.c  (grub_wait_after_message): Print a newline
        after waiting for user input.

        * loader/i386/linux.c: Include `<grub/normal.h>'.
        (grub_cmd_linux): Improve the error message about `ask' mode, by
        waiting for user input so it's not missed (we can do this, since
        user requested interaction).

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/loader/i386/linux.c
    trunk/grub2/normal/menu_text.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-05-02 13:34:01 UTC (rev 2155)
+++ trunk/grub2/ChangeLog	2009-05-02 15:24:28 UTC (rev 2156)
@@ -1,3 +1,13 @@
+2009-05-02  Robert Millan  <[email protected]>
+
+	* normal/menu_text.c  (grub_wait_after_message): Print a newline
+	after waiting for user input.
+
+	* loader/i386/linux.c: Include `<grub/normal.h>'.
+	(grub_cmd_linux): Improve the error message about `ask' mode, by
+	waiting for user input so it's not missed (we can do this, since
+	user requested interaction).
+
 2009-05-02  Vladimir Serbinenko  <[email protected]>
 
 	Added missing lst to grub-mkrescue

Modified: trunk/grub2/loader/i386/linux.c
===================================================================
--- trunk/grub2/loader/i386/linux.c	2009-05-02 13:34:01 UTC (rev 2155)
+++ trunk/grub2/loader/i386/linux.c	2009-05-02 15:24:28 UTC (rev 2156)
@@ -20,6 +20,7 @@
 #include <grub/machine/machine.h>
 #include <grub/machine/memory.h>
 #include <grub/machine/loader.h>
+#include <grub/normal.h>
 #include <grub/file.h>
 #include <grub/disk.h>
 #include <grub/err.h>
@@ -584,7 +585,12 @@
 	  vid_mode = GRUB_LINUX_VID_MODE_EXTENDED;
 	else if (grub_strcmp (val, "ask") == 0)
 	  {
-	    grub_error (GRUB_ERR_BAD_ARGUMENT, "Legacy `ask' parameter no longer supported.");
+	    grub_printf ("Legacy `ask' parameter no longer supported.\n");
+
+	    /* We usually would never do this in a loader, but "vga=ask" means user
+	       requested interaction, so it can't hurt to request keyboard input.  */
+	    grub_wait_after_message ();
+
 	    goto fail;
 	  }
 	else

Modified: trunk/grub2/normal/menu_text.c
===================================================================
--- trunk/grub2/normal/menu_text.c	2009-05-02 13:34:01 UTC (rev 2155)
+++ trunk/grub2/normal/menu_text.c	2009-05-02 15:24:28 UTC (rev 2156)
@@ -41,6 +41,7 @@
 {
   grub_printf ("\nPress any key to continue...");
   (void) grub_getkey ();
+  grub_putchar ('\n');
 }
 
 static void
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.