mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
normal/menu: Don't show "Booting `%s'" msg when auto-booting with TIMEOUT_STYLE_HIDDEN
When the user has asked the menu code to be hidden/quiet and the current entry is being autobooted because the timeout has expired don't show the "Booting `%s'" msg. This is necessary to let flicker-free boots really be flicker free, otherwise the "Booting `%s'" msg will kick the EFI fb into text mode and show the msg, breaking the flicker-free experience. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Robbie Harwood <rharwood@redhat.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
7c316e1830
commit
5bb4f2b7d6
1 file changed
+16
-8
+16
-8
@@ -573,13 +573,15 @@ print_countdown (struct grub_term_coordinate *pos, int n)
|
|||||||
entry to be executed is a result of an automatic default selection because
|
entry to be executed is a result of an automatic default selection because
|
||||||
of the timeout. */
|
of the timeout. */
|
||||||
static int
|
static int
|
||||||
run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
run_menu (grub_menu_t menu, int nested, int *auto_boot, int *notify_boot)
|
||||||
{
|
{
|
||||||
grub_uint64_t saved_time;
|
grub_uint64_t saved_time;
|
||||||
int default_entry, current_entry;
|
int default_entry, current_entry;
|
||||||
int timeout;
|
int timeout;
|
||||||
enum timeout_style timeout_style;
|
enum timeout_style timeout_style;
|
||||||
|
|
||||||
|
*notify_boot = 1;
|
||||||
|
|
||||||
default_entry = get_entry_number (menu, "default");
|
default_entry = get_entry_number (menu, "default");
|
||||||
|
|
||||||
/* If DEFAULT_ENTRY is not within the menu entries, fall back to
|
/* If DEFAULT_ENTRY is not within the menu entries, fall back to
|
||||||
@@ -654,6 +656,7 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
|||||||
if (timeout == 0)
|
if (timeout == 0)
|
||||||
{
|
{
|
||||||
*auto_boot = 1;
|
*auto_boot = 1;
|
||||||
|
*notify_boot = timeout_style != TIMEOUT_STYLE_HIDDEN;
|
||||||
return default_entry;
|
return default_entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -807,12 +810,16 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
|||||||
|
|
||||||
/* Callback invoked immediately before a menu entry is executed. */
|
/* Callback invoked immediately before a menu entry is executed. */
|
||||||
static void
|
static void
|
||||||
notify_booting (grub_menu_entry_t entry,
|
notify_booting (grub_menu_entry_t entry, void *userdata)
|
||||||
void *userdata __attribute__((unused)))
|
|
||||||
{
|
{
|
||||||
grub_printf (" ");
|
int *notify_boot = userdata;
|
||||||
grub_printf_ (N_("Booting `%s'"), entry->title);
|
|
||||||
grub_printf ("\n\n");
|
if (*notify_boot)
|
||||||
|
{
|
||||||
|
grub_printf (" ");
|
||||||
|
grub_printf_ (N_("Booting `%s'"), entry->title);
|
||||||
|
grub_printf ("\n\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callback invoked when a default menu entry executed because of a timeout
|
/* Callback invoked when a default menu entry executed because of a timeout
|
||||||
@@ -860,8 +867,9 @@ show_menu (grub_menu_t menu, int nested, int autobooted)
|
|||||||
int boot_entry;
|
int boot_entry;
|
||||||
grub_menu_entry_t e;
|
grub_menu_entry_t e;
|
||||||
int auto_boot;
|
int auto_boot;
|
||||||
|
int notify_boot;
|
||||||
|
|
||||||
boot_entry = run_menu (menu, nested, &auto_boot);
|
boot_entry = run_menu (menu, nested, &auto_boot, ¬ify_boot);
|
||||||
if (boot_entry < 0)
|
if (boot_entry < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -873,7 +881,7 @@ show_menu (grub_menu_t menu, int nested, int autobooted)
|
|||||||
|
|
||||||
if (auto_boot)
|
if (auto_boot)
|
||||||
grub_menu_execute_with_fallback (menu, e, autobooted,
|
grub_menu_execute_with_fallback (menu, e, autobooted,
|
||||||
&execution_callback, 0);
|
&execution_callback, ¬ify_boot);
|
||||||
else
|
else
|
||||||
grub_menu_execute_entry (e, 0);
|
grub_menu_execute_entry (e, 0);
|
||||||
if (autobooted)
|
if (autobooted)
|
||||||
|
|||||||
Reference in new issue
Block a user