Bug#569678: grub-pc: does not clear serial console
Colin Watson
cjwatson at debian.org
Wed Jan 5 12:13:16 UTC 2011
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? 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);
--
Colin Watson [cjwatson at debian.org]
More information about the Pkg-grub-devel
mailing list