dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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