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