grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Quieten normal mode startup unless a prompt is going to be d


From: Robert Millan
Subject: Re: [PATCH] Quieten normal mode startup unless a prompt is going to be displayed
Date: Thu, 3 Sep 2009 16:56:01 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Sep 03, 2009 at 03:00:48PM +0100, Colin Watson wrote:
> Index: normal/main.c
> ===================================================================
> --- normal/main.c     (revision 2561)
> +++ normal/main.c     (working copy)
> @@ -503,7 +503,7 @@
>  }
>  
>  static grub_err_t
> -grub_normal_reader_init (void)
> +grub_normal_display_intro (void)
>  {
>    grub_normal_init_page ();
>    grub_setcursor (1);
> @@ -524,7 +524,14 @@
>  {
>    grub_parser_t parser = grub_parser_get_current ();
>    char prompt[8 + grub_strlen (parser->name)];
> +  static int displayed_intro;
>  
> +  if (! displayed_intro)
> +    {
> +      grub_normal_display_intro ();
> +      displayed_intro = 1;
> +    }
> +
>    grub_sprintf (prompt, "%s:%s> ", parser->name, (cont) ? "" : "grub");
>  
>    while (1)
> @@ -547,7 +554,6 @@
>  static struct grub_reader grub_normal_reader =
>    {
>      .name = "normal",
> -    .init = grub_normal_reader_init,
>      .read_line = grub_normal_read_line
>    };

grub_normal_read_line() seems like an odd place to handle this.  It looks like
a workaround for a bug we already had (about welcome message being printed
twice).

This was discussed in a thread with subject "regression in hiddenmenu"
(last June).  Later, Bean proposed a patch (see "[PATCH] hidemenu fix").

I would appreciate if you can have a look at both things.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]