2010-03-01 Vladimir Serbinenko <phcoder@gmail.com>

Wait for user entry basing on presence of output rather than on errors.

	* include/grub/normal.h (grub_normal_get_line_counter): New proto.
	(grub_install_newline_hook): Likewise.
	* normal/main.c (GRUB_MOD_INIT): Call grub_install_newline_hook.
	* normal/menu.c (show_menu): Check line_counter to determine presence
	of output.
	* normal/term.c (grub_normal_line_counter): New variable.
	(grub_normal_get_line_counter): New function.
	(grub_install_newline_hook): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-03-01 20:58:45 +01:00
parent 5382b1e4a8
commit c6f2fe52f1
5 changed files with 38 additions and 7 deletions

View file

@ -559,14 +559,14 @@ show_menu (grub_menu_t menu, int nested)
}
else
{
int lines_before = grub_normal_get_line_counter ();
grub_errno = GRUB_ERR_NONE;
grub_menu_execute_entry (e);
if (grub_errno != GRUB_ERR_NONE)
{
grub_print_error ();
grub_errno = GRUB_ERR_NONE;
grub_wait_after_message ();
}
grub_print_error ();
grub_errno = GRUB_ERR_NONE;
if (lines_before != grub_normal_get_line_counter ())
grub_wait_after_message ();
}
}