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