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