nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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