nalika / rpms / grub2

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