updated on Sun Jan 15 00:02:00 UTC 2012
[aur-mirror.git] / grub2-efi-ubuntu / ubuntu_normal_quiet.patch
blobfba358aeea8c0d9a9f2d0d11e1f92d533976dae2
1 Description: Reduce visual clutter in normal mode
2 Don't display introductory message about line editing unless we're actually
3 offering a shell prompt. (This is believed to be a workaround for a
4 different bug. We'll go with this for now, but will drop this in favour of
5 a better fix upstream if somebody figures out what that is.)
7 Don't clear the screen just before booting if we never drew the menu in the
8 first place.
9 Author: Colin Watson <cjwatson@ubuntu.com>
10 Forwarded: http://lists.gnu.org/archive/html/grub-devel/2009-09/msg00056.html
11 Last-Update: 2011-01-05
13 Index: b/grub-core/normal/main.c
14 ===================================================================
15 --- a/grub-core/normal/main.c
16 +++ b/grub-core/normal/main.c
17 @@ -384,6 +384,13 @@
18 grub_normal_read_line_real (char **line, int cont, int nested)
20 const char *prompt;
21 + static int displayed_intro;
23 + if (! displayed_intro)
24 + {
25 + grub_normal_reader_init (nested);
26 + displayed_intro = 1;
27 + }
29 if (cont)
30 prompt = ">";
31 @@ -430,8 +437,6 @@
32 return;
35 - grub_normal_reader_init (nested);
37 while (1)
39 char *line;
40 Index: b/grub-core/normal/menu.c
41 ===================================================================
42 --- a/grub-core/normal/menu.c
43 +++ b/grub-core/normal/menu.c
44 @@ -721,6 +721,7 @@
45 int boot_entry;
46 grub_menu_entry_t e;
47 int auto_boot;
48 + int initial_timeout = grub_menu_get_timeout ();
50 boot_entry = run_menu (menu, nested, &auto_boot);
51 if (boot_entry < 0)
52 @@ -730,7 +731,9 @@
53 if (! e)
54 continue; /* Menu is empty. */
56 - grub_cls ();
57 + /* Only clear the screen if we drew the menu in the first place. */
58 + if (initial_timeout != 0)
59 + grub_cls ();
61 if (auto_boot)
62 grub_menu_execute_with_fallback (menu, e, autobooted,