Bug#569678: grub-pc: does not clear serial console

Vladimir 'φ-coder/phcoder' Serbinenko phcoder at gmail.com
Wed Jan 5 12:50:38 UTC 2011


On 01/05/2011 01:13 PM, Colin Watson wrote:
> On Wed, Jan 05, 2011 at 12:25:08PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>   
>> tag 569678 fixed-upstream
>> thanks
>> managed to recreate. Added forced cls on output initialisation. This
>> fixed it.
>>     
> Thanks.  This fix seems to me like it might be a bit over-the-top,
> though; won't it mean that we'll *always* have a screen clear on VGA
> console output as well?
Sorry for misunderstanding. It's limited to terminfo consoles.
>   IME, that tends to produce unnecessary flicker
> if the menu isn't being displayed.
>
> I know that normal mode clears the screen unconditionally as well, but
> that's easily fixed:
>
> Index: b/grub-core/normal/menu.c
> ===================================================================
> --- a/grub-core/normal/menu.c
> +++ b/grub-core/normal/menu.c
> @@ -597,6 +597,7 @@
>        int boot_entry;
>        grub_menu_entry_t e;
>        int auto_boot;
> +      int initial_timeout = grub_menu_get_timeout ();
>  
>        boot_entry = run_menu (menu, nested, &auto_boot);
>        if (boot_entry < 0)
> @@ -606,7 +607,9 @@
>        if (! e)
>  	continue; /* Menu is empty.  */
>  
> -      grub_cls ();
> +      /* Only clear the screen if we drew the menu in the first place.  */
> +      if (initial_timeout != 0)
> +	grub_cls ();
>  
>        if (auto_boot)
>  	grub_menu_execute_with_fallback (menu, e, &execution_callback, 0);
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 294 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20110105/5f3a80d6/attachment.pgp>


More information about the Pkg-grub-devel mailing list