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

8631a2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8631a2
From: William Jon McCann <william.jon.mccann@gmail.com>
8631a2
Date: Wed, 15 May 2013 13:30:20 -0400
8631a2
Subject: [PATCH] Don't write messages to the screen
8631a2
8631a2
Writing messages to the screen before the menus or boot splash
8631a2
happens so quickly it looks like something is wrong and isn't
8631a2
very appealing.
8631a2
---
8631a2
 grub-core/gettext/gettext.c       | 25 +++++--------------------
8631a2
 grub-core/kern/main.c             |  5 -----
8631a2
 grub-core/boot/i386/pc/boot.S     |  3 ---
8631a2
 grub-core/boot/i386/pc/diskboot.S |  5 -----
8631a2
 util/grub.d/10_linux.in           |  7 -------
8631a2
 5 files changed, 5 insertions(+), 40 deletions(-)
8631a2
8631a2
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
8631a2
index 4880cefe3f8..b22e1bcc94b 100644
8631a2
--- a/grub-core/gettext/gettext.c
8631a2
+++ b/grub-core/gettext/gettext.c
8631a2
@@ -434,16 +434,12 @@ static char *
8631a2
 grub_gettext_env_write_lang (struct grub_env_var *var
8631a2
 			     __attribute__ ((unused)), const char *val)
8631a2
 {
8631a2
-  grub_err_t err;
8631a2
+  grub_err_t __attribute__((__unused__)) err;
8631a2
   err = grub_gettext_init_ext (&main_context, val, grub_env_get ("locale_dir"),
8631a2
 			       grub_env_get ("prefix"));
8631a2
-  if (err)
8631a2
-    grub_print_error ();
8631a2
 
8631a2
   err = grub_gettext_init_ext (&secondary_context, val,
8631a2
 			       grub_env_get ("secondary_locale_dir"), 0);
8631a2
-  if (err)
8631a2
-    grub_print_error ();
8631a2
 
8631a2
   return grub_strdup (val);
8631a2
 }
8631a2
@@ -451,23 +447,19 @@ grub_gettext_env_write_lang (struct grub_env_var *var
8631a2
 void
8631a2
 grub_gettext_reread_prefix (const char *val)
8631a2
 {
8631a2
-  grub_err_t err;
8631a2
+  grub_err_t __attribute__((__unused__)) err;
8631a2
   err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"), 
8631a2
 			       grub_env_get ("locale_dir"),
8631a2
 			       val);
8631a2
-  if (err)
8631a2
-    grub_print_error ();
8631a2
 }
8631a2
 
8631a2
 static char *
8631a2
 read_main (struct grub_env_var *var
8631a2
 	   __attribute__ ((unused)), const char *val)
8631a2
 {
8631a2
-  grub_err_t err;
8631a2
+  grub_err_t __attribute__((__unused__)) err;
8631a2
   err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"), val,
8631a2
 			       grub_env_get ("prefix"));
8631a2
-  if (err)
8631a2
-    grub_print_error ();
8631a2
   return grub_strdup (val);
8631a2
 }
8631a2
 
8631a2
@@ -475,12 +467,9 @@ static char *
8631a2
 read_secondary (struct grub_env_var *var
8631a2
 		__attribute__ ((unused)), const char *val)
8631a2
 {
8631a2
-  grub_err_t err;
8631a2
+  grub_err_t __attribute__((__unused__)) err;
8631a2
   err = grub_gettext_init_ext (&secondary_context, grub_env_get ("lang"), val,
8631a2
 			       0);
8631a2
-  if (err)
8631a2
-    grub_print_error ();
8631a2
-
8631a2
   return grub_strdup (val);
8631a2
 }
8631a2
 
8631a2
@@ -500,18 +489,14 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
8631a2
 GRUB_MOD_INIT (gettext)
8631a2
 {
8631a2
   const char *lang;
8631a2
-  grub_err_t err;
8631a2
+  grub_err_t __attribute__((__unused__)) err;
8631a2
 
8631a2
   lang = grub_env_get ("lang");
8631a2
 
8631a2
   err = grub_gettext_init_ext (&main_context, lang, grub_env_get ("locale_dir"),
8631a2
 			       grub_env_get ("prefix"));
8631a2
-  if (err)
8631a2
-    grub_print_error ();
8631a2
   err = grub_gettext_init_ext (&secondary_context, lang,
8631a2
 			       grub_env_get ("secondary_locale_dir"), 0);
8631a2
-  if (err)
8631a2
-    grub_print_error ();
8631a2
 
8631a2
   grub_register_variable_hook ("locale_dir", NULL, read_main);
8631a2
   grub_register_variable_hook ("secondary_locale_dir", NULL, read_secondary);
8631a2
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
8631a2
index 8ab7794c47b..da47b18b50e 100644
8631a2
--- a/grub-core/kern/main.c
8631a2
+++ b/grub-core/kern/main.c
8631a2
@@ -268,11 +268,6 @@ grub_main (void)
8631a2
 
8631a2
   grub_boot_time ("After machine init.");
8631a2
 
8631a2
-  /* Hello.  */
8631a2
-  grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
8631a2
-  grub_printf ("Welcome to GRUB!\n\n");
8631a2
-  grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
8631a2
-
8631a2
   grub_load_config ();
8631a2
 
8631a2
   grub_boot_time ("Before loading embedded modules.");
8631a2
diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
8631a2
index 2bd0b2d2866..ea167fe1206 100644
8631a2
--- a/grub-core/boot/i386/pc/boot.S
8631a2
+++ b/grub-core/boot/i386/pc/boot.S
8631a2
@@ -249,9 +249,6 @@ real_start:
8631a2
 	/* save drive reference first thing! */
8631a2
 	pushw	%dx
8631a2
 
8631a2
-	/* print a notification message on the screen */
8631a2
-	MSG(notification_string)
8631a2
-
8631a2
 	/* set %si to the disk address packet */
8631a2
 	movw	$disk_address_packet, %si
8631a2
 
8631a2
diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S
8631a2
index c1addc0df29..68d31de0c4c 100644
8631a2
--- a/grub-core/boot/i386/pc/diskboot.S
8631a2
+++ b/grub-core/boot/i386/pc/diskboot.S
8631a2
@@ -50,11 +50,6 @@ _start:
8631a2
 	/* save drive reference first thing! */
8631a2
 	pushw	%dx
8631a2
 
8631a2
-	/* print a notification message on the screen */
8631a2
-	pushw	%si
8631a2
-	MSG(notification_string)
8631a2
-	popw	%si
8631a2
-
8631a2
 	/* this sets up for the first run through "bootloop" */
8631a2
 	movw	$LOCAL(firstlist), %di
8631a2
 
8631a2
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
8631a2
index 233754ff296..3a5aa0f8dc9 100644
8631a2
--- a/util/grub.d/10_linux.in
8631a2
+++ b/util/grub.d/10_linux.in
8631a2
@@ -138,27 +138,20 @@ linux_entry ()
8631a2
     fi
8631a2
     printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
8631a2
   fi
8631a2
-  message="$(gettext_printf "Loading Linux %s ..." ${version})"
8631a2
   sed "s/^/$submenu_indentation/" << EOF
8631a2
-	echo	'$(echo "$message" | grub_quote)'
8631a2
 	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
8631a2
 EOF
8631a2
   if test -n "${initrd}" ; then
8631a2
-    # TRANSLATORS: ramdisk isn't identifier. Should be translated.
8631a2
-    message="$(gettext_printf "Loading initial ramdisk ...")"
8631a2
     initrd_path=
8631a2
     for i in ${initrd}; do
8631a2
       initrd_path="${initrd_path} ${rel_dirname}/${i}"
8631a2
     done
8631a2
     sed "s/^/$submenu_indentation/" << EOF
8631a2
-	echo	'$(echo "$message" | grub_quote)'
8631a2
 	initrd	$(echo $initrd_path)
8631a2
 EOF
8631a2
   fi
8631a2
   if test -n "${fdt}" ; then
8631a2
-    message="$(gettext_printf "Loading fdt ...")"
8631a2
     sed "s/^/$submenu_indentation/" << EOF
8631a2
-	echo	'$(echo "$message" | grub_quote)'
8631a2
 	devicetree	${rel_dirname}/${fdt}
8631a2
 EOF
8631a2
   fi