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

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