|
|
5593c8 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
5593c8 |
From: William Jon McCann <william.jon.mccann@gmail.com>
|
|
|
5593c8 |
Date: Wed, 15 May 2013 13:30:20 -0400
|
|
|
5593c8 |
Subject: [PATCH] Don't write messages to the screen
|
|
|
5593c8 |
|
|
|
5593c8 |
Writing messages to the screen before the menus or boot splash
|
|
|
5593c8 |
happens so quickly it looks like something is wrong and isn't
|
|
|
5593c8 |
very appealing.
|
|
|
5593c8 |
---
|
|
|
5593c8 |
grub-core/gettext/gettext.c | 25 +++++--------------------
|
|
|
5593c8 |
grub-core/kern/main.c | 5 -----
|
|
|
5593c8 |
grub-core/boot/i386/pc/boot.S | 3 ---
|
|
|
5593c8 |
grub-core/boot/i386/pc/diskboot.S | 5 -----
|
|
|
5593c8 |
util/grub.d/10_linux.in | 7 -------
|
|
|
5593c8 |
5 files changed, 5 insertions(+), 40 deletions(-)
|
|
|
5593c8 |
|
|
|
5593c8 |
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
|
|
|
d3c3ab |
index 4d02e62c109..84d520cd494 100644
|
|
|
5593c8 |
--- a/grub-core/gettext/gettext.c
|
|
|
5593c8 |
+++ b/grub-core/gettext/gettext.c
|
|
|
5593c8 |
@@ -434,16 +434,12 @@ static char *
|
|
|
5593c8 |
grub_gettext_env_write_lang (struct grub_env_var *var
|
|
|
5593c8 |
__attribute__ ((unused)), const char *val)
|
|
|
5593c8 |
{
|
|
|
5593c8 |
- grub_err_t err;
|
|
|
5593c8 |
+ grub_err_t __attribute__((__unused__)) err;
|
|
|
5593c8 |
err = grub_gettext_init_ext (&main_context, val, grub_env_get ("locale_dir"),
|
|
|
5593c8 |
grub_env_get ("prefix"));
|
|
|
5593c8 |
- if (err)
|
|
|
5593c8 |
- grub_print_error ();
|
|
|
5593c8 |
|
|
|
5593c8 |
err = grub_gettext_init_ext (&secondary_context, val,
|
|
|
5593c8 |
grub_env_get ("secondary_locale_dir"), 0);
|
|
|
5593c8 |
- if (err)
|
|
|
5593c8 |
- grub_print_error ();
|
|
|
5593c8 |
|
|
|
5593c8 |
return grub_strdup (val);
|
|
|
5593c8 |
}
|
|
|
5593c8 |
@@ -451,23 +447,19 @@ grub_gettext_env_write_lang (struct grub_env_var *var
|
|
|
5593c8 |
void
|
|
|
5593c8 |
grub_gettext_reread_prefix (const char *val)
|
|
|
5593c8 |
{
|
|
|
5593c8 |
- grub_err_t err;
|
|
|
5593c8 |
+ grub_err_t __attribute__((__unused__)) err;
|
|
|
5593c8 |
err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"),
|
|
|
5593c8 |
grub_env_get ("locale_dir"),
|
|
|
5593c8 |
val);
|
|
|
5593c8 |
- if (err)
|
|
|
5593c8 |
- grub_print_error ();
|
|
|
5593c8 |
}
|
|
|
5593c8 |
|
|
|
5593c8 |
static char *
|
|
|
5593c8 |
read_main (struct grub_env_var *var
|
|
|
5593c8 |
__attribute__ ((unused)), const char *val)
|
|
|
5593c8 |
{
|
|
|
5593c8 |
- grub_err_t err;
|
|
|
5593c8 |
+ grub_err_t __attribute__((__unused__)) err;
|
|
|
5593c8 |
err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"), val,
|
|
|
5593c8 |
grub_env_get ("prefix"));
|
|
|
5593c8 |
- if (err)
|
|
|
5593c8 |
- grub_print_error ();
|
|
|
5593c8 |
return grub_strdup (val);
|
|
|
5593c8 |
}
|
|
|
5593c8 |
|
|
|
5593c8 |
@@ -475,12 +467,9 @@ static char *
|
|
|
5593c8 |
read_secondary (struct grub_env_var *var
|
|
|
5593c8 |
__attribute__ ((unused)), const char *val)
|
|
|
5593c8 |
{
|
|
|
5593c8 |
- grub_err_t err;
|
|
|
5593c8 |
+ grub_err_t __attribute__((__unused__)) err;
|
|
|
5593c8 |
err = grub_gettext_init_ext (&secondary_context, grub_env_get ("lang"), val,
|
|
|
5593c8 |
0);
|
|
|
5593c8 |
- if (err)
|
|
|
5593c8 |
- grub_print_error ();
|
|
|
5593c8 |
-
|
|
|
5593c8 |
return grub_strdup (val);
|
|
|
5593c8 |
}
|
|
|
5593c8 |
|
|
|
5593c8 |
@@ -500,18 +489,14 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
|
|
|
5593c8 |
GRUB_MOD_INIT (gettext)
|
|
|
5593c8 |
{
|
|
|
5593c8 |
const char *lang;
|
|
|
5593c8 |
- grub_err_t err;
|
|
|
5593c8 |
+ grub_err_t __attribute__((__unused__)) err;
|
|
|
5593c8 |
|
|
|
5593c8 |
lang = grub_env_get ("lang");
|
|
|
5593c8 |
|
|
|
5593c8 |
err = grub_gettext_init_ext (&main_context, lang, grub_env_get ("locale_dir"),
|
|
|
5593c8 |
grub_env_get ("prefix"));
|
|
|
5593c8 |
- if (err)
|
|
|
5593c8 |
- grub_print_error ();
|
|
|
5593c8 |
err = grub_gettext_init_ext (&secondary_context, lang,
|
|
|
5593c8 |
grub_env_get ("secondary_locale_dir"), 0);
|
|
|
5593c8 |
- if (err)
|
|
|
5593c8 |
- grub_print_error ();
|
|
|
5593c8 |
|
|
|
5593c8 |
grub_register_variable_hook ("locale_dir", NULL, read_main);
|
|
|
5593c8 |
grub_register_variable_hook ("secondary_locale_dir", NULL, read_secondary);
|
|
|
5593c8 |
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
|
|
d3c3ab |
index d1de9fa6873..48058d983ce 100644
|
|
|
5593c8 |
--- a/grub-core/kern/main.c
|
|
|
5593c8 |
+++ b/grub-core/kern/main.c
|
|
|
5593c8 |
@@ -269,11 +269,6 @@ grub_main (void)
|
|
|
5593c8 |
|
|
|
5593c8 |
grub_boot_time ("After machine init.");
|
|
|
5593c8 |
|
|
|
5593c8 |
- /* Hello. */
|
|
|
5593c8 |
- grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
|
|
|
5593c8 |
- grub_printf ("Welcome to GRUB!\n\n");
|
|
|
5593c8 |
- grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
|
|
|
5593c8 |
-
|
|
|
5593c8 |
/* Init verifiers API. */
|
|
|
5593c8 |
grub_verifiers_init ();
|
|
|
5593c8 |
|
|
|
5593c8 |
diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
|
|
|
d3c3ab |
index 2bd0b2d2866..ea167fe1206 100644
|
|
|
5593c8 |
--- a/grub-core/boot/i386/pc/boot.S
|
|
|
5593c8 |
+++ b/grub-core/boot/i386/pc/boot.S
|
|
|
5593c8 |
@@ -249,9 +249,6 @@ real_start:
|
|
|
5593c8 |
/* save drive reference first thing! */
|
|
|
5593c8 |
pushw %dx
|
|
|
5593c8 |
|
|
|
5593c8 |
- /* print a notification message on the screen */
|
|
|
5593c8 |
- MSG(notification_string)
|
|
|
5593c8 |
-
|
|
|
5593c8 |
/* set %si to the disk address packet */
|
|
|
5593c8 |
movw $disk_address_packet, %si
|
|
|
5593c8 |
|
|
|
5593c8 |
diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S
|
|
|
d3c3ab |
index c1addc0df29..68d31de0c4c 100644
|
|
|
5593c8 |
--- a/grub-core/boot/i386/pc/diskboot.S
|
|
|
5593c8 |
+++ b/grub-core/boot/i386/pc/diskboot.S
|
|
|
5593c8 |
@@ -50,11 +50,6 @@ _start:
|
|
|
5593c8 |
/* save drive reference first thing! */
|
|
|
5593c8 |
pushw %dx
|
|
|
5593c8 |
|
|
|
5593c8 |
- /* print a notification message on the screen */
|
|
|
5593c8 |
- pushw %si
|
|
|
5593c8 |
- MSG(notification_string)
|
|
|
5593c8 |
- popw %si
|
|
|
5593c8 |
-
|
|
|
5593c8 |
/* this sets up for the first run through "bootloop" */
|
|
|
5593c8 |
movw $LOCAL(firstlist), %di
|
|
|
5593c8 |
|
|
|
5593c8 |
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
|
|
d3c3ab |
index dc75a1c30bf..ad2ac4b078d 100644
|
|
|
5593c8 |
--- a/util/grub.d/10_linux.in
|
|
|
5593c8 |
+++ b/util/grub.d/10_linux.in
|
|
|
5593c8 |
@@ -138,27 +138,20 @@ linux_entry ()
|
|
|
5593c8 |
fi
|
|
|
5593c8 |
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
|
|
|
5593c8 |
fi
|
|
|
5593c8 |
- message="$(gettext_printf "Loading Linux %s ..." ${version})"
|
|
|
5593c8 |
sed "s/^/$submenu_indentation/" << EOF
|
|
|
5593c8 |
- echo '$(echo "$message" | grub_quote)'
|
|
|
5593c8 |
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
|
|
5593c8 |
EOF
|
|
|
5593c8 |
if test -n "${initrd}" ; then
|
|
|
5593c8 |
- # TRANSLATORS: ramdisk isn't identifier. Should be translated.
|
|
|
5593c8 |
- message="$(gettext_printf "Loading initial ramdisk ...")"
|
|
|
5593c8 |
initrd_path=
|
|
|
5593c8 |
for i in ${initrd}; do
|
|
|
5593c8 |
initrd_path="${initrd_path} ${rel_dirname}/${i}"
|
|
|
5593c8 |
done
|
|
|
5593c8 |
sed "s/^/$submenu_indentation/" << EOF
|
|
|
5593c8 |
- echo '$(echo "$message" | grub_quote)'
|
|
|
5593c8 |
initrd $(echo $initrd_path)
|
|
|
5593c8 |
EOF
|
|
|
5593c8 |
fi
|
|
|
5593c8 |
if test -n "${fdt}" ; then
|
|
|
5593c8 |
- message="$(gettext_printf "Loading fdt ...")"
|
|
|
5593c8 |
sed "s/^/$submenu_indentation/" << EOF
|
|
|
5593c8 |
- echo '$(echo "$message" | grub_quote)'
|
|
|
5593c8 |
devicetree ${rel_dirname}/${fdt}
|
|
|
5593c8 |
EOF
|
|
|
5593c8 |
fi
|