Blame SOURCES/0104-Don-t-write-messages-to-the-screen.patch

d41074
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a85e8e
From: William Jon McCann <william.jon.mccann@gmail.com>
a85e8e
Date: Wed, 15 May 2013 13:30:20 -0400
d41074
Subject: [PATCH] Don't write messages to the screen
a85e8e
a85e8e
Writing messages to the screen before the menus or boot splash
a85e8e
happens so quickly it looks like something is wrong and isn't
a85e8e
very appealing.
a85e8e
---
a85e8e
 grub-core/gettext/gettext.c       | 15 ---------------
a85e8e
 grub-core/kern/main.c             |  5 -----
d41074
 grub-core/boot/i386/pc/boot.S     |  3 ---
d41074
 grub-core/boot/i386/pc/diskboot.S |  5 -----
a85e8e
 util/grub.d/10_linux.in           |  7 -------
a85e8e
 5 files changed, 35 deletions(-)
a85e8e
a85e8e
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
d41074
index 4880cefe3f8..1e5c21d7ef2 100644
a85e8e
--- a/grub-core/gettext/gettext.c
a85e8e
+++ b/grub-core/gettext/gettext.c
a85e8e
@@ -437,13 +437,9 @@ grub_gettext_env_write_lang (struct grub_env_var *var
a85e8e
   grub_err_t err;
a85e8e
   err = grub_gettext_init_ext (&main_context, val, grub_env_get ("locale_dir"),
a85e8e
 			       grub_env_get ("prefix"));
a85e8e
-  if (err)
a85e8e
-    grub_print_error ();
a85e8e
 
a85e8e
   err = grub_gettext_init_ext (&secondary_context, val,
a85e8e
 			       grub_env_get ("secondary_locale_dir"), 0);
a85e8e
-  if (err)
a85e8e
-    grub_print_error ();
a85e8e
 
a85e8e
   return grub_strdup (val);
a85e8e
 }
a85e8e
@@ -455,8 +451,6 @@ grub_gettext_reread_prefix (const char *val)
a85e8e
   err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"), 
a85e8e
 			       grub_env_get ("locale_dir"),
a85e8e
 			       val);
a85e8e
-  if (err)
a85e8e
-    grub_print_error ();
a85e8e
 }
a85e8e
 
a85e8e
 static char *
a85e8e
@@ -466,8 +460,6 @@ read_main (struct grub_env_var *var
a85e8e
   grub_err_t err;
a85e8e
   err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"), val,
a85e8e
 			       grub_env_get ("prefix"));
a85e8e
-  if (err)
a85e8e
-    grub_print_error ();
a85e8e
   return grub_strdup (val);
a85e8e
 }
a85e8e
 
a85e8e
@@ -478,9 +470,6 @@ read_secondary (struct grub_env_var *var
a85e8e
   grub_err_t err;
a85e8e
   err = grub_gettext_init_ext (&secondary_context, grub_env_get ("lang"), val,
a85e8e
 			       0);
a85e8e
-  if (err)
a85e8e
-    grub_print_error ();
a85e8e
-
a85e8e
   return grub_strdup (val);
a85e8e
 }
a85e8e
 
a85e8e
@@ -506,12 +495,8 @@ GRUB_MOD_INIT (gettext)
a85e8e
 
a85e8e
   err = grub_gettext_init_ext (&main_context, lang, grub_env_get ("locale_dir"),
a85e8e
 			       grub_env_get ("prefix"));
a85e8e
-  if (err)
a85e8e
-    grub_print_error ();
a85e8e
   err = grub_gettext_init_ext (&secondary_context, lang,
a85e8e
 			       grub_env_get ("secondary_locale_dir"), 0);
a85e8e
-  if (err)
a85e8e
-    grub_print_error ();
a85e8e
 
a85e8e
   grub_register_variable_hook ("locale_dir", NULL, read_main);
a85e8e
   grub_register_variable_hook ("secondary_locale_dir", NULL, read_secondary);
a85e8e
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
d41074
index 8ab7794c47b..da47b18b50e 100644
a85e8e
--- a/grub-core/kern/main.c
a85e8e
+++ b/grub-core/kern/main.c
a85e8e
@@ -268,11 +268,6 @@ grub_main (void)
a85e8e
 
a85e8e
   grub_boot_time ("After machine init.");
a85e8e
 
a85e8e
-  /* Hello.  */
a85e8e
-  grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
a85e8e
-  grub_printf ("Welcome to GRUB!\n\n");
a85e8e
-  grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
a85e8e
-
a85e8e
   grub_load_config ();
a85e8e
 
a85e8e
   grub_boot_time ("Before loading embedded modules.");
d41074
diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
d41074
index b4975e2d029..432a472d529 100644
d41074
--- a/grub-core/boot/i386/pc/boot.S
d41074
+++ b/grub-core/boot/i386/pc/boot.S
d41074
@@ -249,9 +249,6 @@ real_start:
d41074
 	/* save drive reference first thing! */
d41074
 	pushw	%dx
d41074
 
d41074
-	/* print a notification message on the screen */
d41074
-	MSG(notification_string)
d41074
-
d41074
 	/* set %si to the disk address packet */
d41074
 	movw	$disk_address_packet, %si
d41074
 
d41074
diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S
d41074
index d030a14c916..a494d029c61 100644
d41074
--- a/grub-core/boot/i386/pc/diskboot.S
d41074
+++ b/grub-core/boot/i386/pc/diskboot.S
d41074
@@ -50,11 +50,6 @@ _start:
d41074
 	/* save drive reference first thing! */
d41074
 	pushw	%dx
d41074
 
d41074
-	/* print a notification message on the screen */
d41074
-	pushw	%si
d41074
-	MSG(notification_string)
d41074
-	popw	%si
d41074
-
d41074
 	/* this sets up for the first run through "bootloop" */
d41074
 	movw	$LOCAL(firstlist), %di
d41074
 
a85e8e
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
d41074
index ad34cc02d36..e762e1f4e37 100644
a85e8e
--- a/util/grub.d/10_linux.in
a85e8e
+++ b/util/grub.d/10_linux.in
a85e8e
@@ -126,29 +126,22 @@ linux_entry ()
a85e8e
     fi
a85e8e
     printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
a85e8e
   fi
a85e8e
-  message="$(gettext_printf "Loading Linux %s ..." ${version})"
a85e8e
   if [ -d /sys/firmware/efi ]; then
a85e8e
     sed "s/^/$submenu_indentation/" << EOF
a85e8e
-	echo	'$(echo "$message" | grub_quote)'
a85e8e
 	linuxefi ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
a85e8e
 EOF
a85e8e
   else
a85e8e
     sed "s/^/$submenu_indentation/" << EOF
a85e8e
-	echo	'$(echo "$message" | grub_quote)'
a85e8e
 	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
a85e8e
 EOF
a85e8e
   fi
a85e8e
   if test -n "${initrd}" ; then
a85e8e
-    # TRANSLATORS: ramdisk isn't identifier. Should be translated.
a85e8e
-    message="$(gettext_printf "Loading initial ramdisk ...")"
a85e8e
     if [ -d /sys/firmware/efi ]; then
a85e8e
       sed "s/^/$submenu_indentation/" << EOF
a85e8e
-	echo	'$(echo "$message" | grub_quote)'
a85e8e
 	initrdefi ${rel_dirname}/${initrd}
a85e8e
 EOF
a85e8e
     else
a85e8e
       sed "s/^/$submenu_indentation/" << EOF
a85e8e
-	echo	'$message'
a85e8e
 	initrd	${rel_dirname}/${initrd}
a85e8e
 EOF
a85e8e
     fi