All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hidemenu fix
@ 2009-07-11  5:26 Bean
  2009-07-11 18:53 ` Robert Millan
  0 siblings, 1 reply; 3+ messages in thread
From: Bean @ 2009-07-11  5:26 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

Hi,

This patch moves the screen init code from reader to menu, so that
hidemenu would work as before. A minor side effect is that if grub.cfg
is not found, the "GNU GRUB" header would not be printed, but I guess
this is not an issue.

-- 
Bean

[-- Attachment #2: hidemenu.diff --]
[-- Type: text/x-patch, Size: 1546 bytes --]

diff --git a/kern/rescue_reader.c b/kern/rescue_reader.c
index 2a06f3f..0b738d1 100644
--- a/kern/rescue_reader.c
+++ b/kern/rescue_reader.c
@@ -26,13 +26,6 @@
 
 static char linebuf[GRUB_RESCUE_BUF_SIZE];
 
-static grub_err_t
-grub_rescue_init (void)
-{
-  grub_printf ("Entering rescue mode...\n");
-  return 0;
-}
-
 /* Prompt to input a command and read the line.  */
 static grub_err_t
 grub_rescue_read_line (char **line, int cont)
@@ -77,7 +70,6 @@ grub_rescue_read_line (char **line, int cont)
 static struct grub_reader grub_rescue_reader =
   {
     .name = "rescue",
-    .init = grub_rescue_init,
     .read_line = grub_rescue_read_line
   };
 
diff --git a/normal/main.c b/normal/main.c
index 7f6336e..84e25f9 100644
--- a/normal/main.c
+++ b/normal/main.c
@@ -474,14 +474,7 @@ grub_cmdline_run (int nested)
   grub_reader_t reader = grub_reader_get_current ();
 
   reader_nested = nested;
-  if (reader->init)
-    reader->init ();
-  grub_reader_loop (0);
-}
 
-static grub_err_t
-grub_normal_reader_init (void)
-{
   grub_normal_init_page ();
   grub_setcursor (1);
 
@@ -491,7 +484,7 @@ grub_normal_reader_init (void)
    device/file completions.%s ]\n\n",
 	       reader_nested ? " ESC at any time exits." : "");
 
-  return 0;
+  grub_reader_loop (0);
 }
 
 static char cmdline[GRUB_MAX_CMDLINE];
@@ -524,7 +517,6 @@ grub_normal_read_line (char **line, int cont)
 static struct grub_reader grub_normal_reader =
   {
     .name = "normal",
-    .init = grub_normal_reader_init,
     .read_line = grub_normal_read_line
   };
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-11 19:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-11  5:26 [PATCH] hidemenu fix Bean
2009-07-11 18:53 ` Robert Millan
2009-07-11 19:53   ` Bean

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.