Pause the execution (10s max) if any errors are displayed so the user
has a chance to see them. * grub-core/kern/err.c (grub_err_printed_errors): New variable. (grub_print_error): Increment grub_err_printed_errors. * grub-core/normal/menu.c (grub_menu_execute_entry): Pause the execution if any errors were displayed. (show_menu): Remove old code for pause. * grub-core/normal/menu_entry.c (run): Likewise. * grub-core/normal/term.c (grub_normal_char_counter): Removed. All users updated. (grub_normal_get_char_counter): Likewise. * include/grub/err.h (grub_err_printed_errors): New external variable. * include/grub/normal.h (grub_normal_get_char_counter): Removed.
This commit is contained in:
parent
f218b09c99
commit
38c259a76a
7 changed files with 37 additions and 32 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
grub_err_t grub_errno;
|
||||
char grub_errmsg[GRUB_MAX_ERRMSG];
|
||||
int grub_err_printed_errors;
|
||||
|
||||
static struct
|
||||
{
|
||||
|
@ -122,7 +123,10 @@ grub_print_error (void)
|
|||
do
|
||||
{
|
||||
if (grub_errno != GRUB_ERR_NONE)
|
||||
grub_err_printf (_("error: %s.\n"), grub_errmsg);
|
||||
{
|
||||
grub_err_printf (_("error: %s.\n"), grub_errmsg);
|
||||
grub_err_printed_errors++;
|
||||
}
|
||||
}
|
||||
while (grub_error_pop ());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue