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:
Vladimir 'phcoder' Serbinenko 2010-09-20 17:46:35 +02:00
parent f218b09c99
commit 38c259a76a
7 changed files with 37 additions and 32 deletions

View file

@ -42,17 +42,9 @@ static struct term_state *term_states = NULL;
/* If the more pager is active. */
static int grub_more;
static int grub_normal_char_counter = 0;
static void
putcode_real (grub_uint32_t code, struct grub_term_output *term);
int
grub_normal_get_char_counter (void)
{
return grub_normal_char_counter;
}
void
grub_normal_reset_more (void)
{
@ -409,8 +401,6 @@ putglyph (const struct grub_unicode_glyph *c, struct grub_term_output *term)
.estimated_width = 1
};
grub_normal_char_counter++;
if (c->base == '\t' && term->getxy)
{
int n;