diff --git a/ChangeLog b/ChangeLog index 50da0e678..0159aab3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-01-05 Vladimir Serbinenko + + Run terminfo_cls on initing terminfo output to clear the screen and + move the cursor to (0,0). + + * grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_init_output): + Call grub_terminfo_output_init. + * grub-core/term/serial.c (grub_serial_term_output): Set .init. + * grub-core/term/terminfo.c (grub_terminfo_output_init): New function. + * include/grub/terminfo.h (grub_terminfo_output_init): New declaration. + 2011-01-05 Vladimir Serbinenko * util/grub-install.in: Determine ofpathname, nvsetenv and efibootmgr diff --git a/grub-core/term/ieee1275/ofconsole.c b/grub-core/term/ieee1275/ofconsole.c index 2b0bddbbb..ab74f21da 100644 --- a/grub-core/term/ieee1275/ofconsole.c +++ b/grub-core/term/ieee1275/ofconsole.c @@ -170,6 +170,8 @@ grub_ofconsole_init_output (struct grub_term_output *term) grub_ofconsole_dimensions (); + grub_terminfo_output_init (term); + return 0; } diff --git a/grub-core/term/serial.c b/grub-core/term/serial.c index d36388359..e672a89d6 100644 --- a/grub-core/term/serial.c +++ b/grub-core/term/serial.c @@ -104,6 +104,7 @@ static struct grub_term_input grub_serial_term_input = static struct grub_term_output grub_serial_term_output = { .name = "serial", + .init = grub_terminfo_output_init, .putchar = grub_terminfo_putchar, .getwh = grub_terminfo_getwh, .getxy = grub_terminfo_getxy, diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c index 8450ea231..0a8c75c74 100644 --- a/grub-core/term/terminfo.c +++ b/grub-core/term/terminfo.c @@ -514,6 +514,13 @@ grub_terminfo_input_init (struct grub_term_input *termi) return GRUB_ERR_NONE; } +grub_err_t +grub_terminfo_output_init (struct grub_term_output *term) +{ + grub_terminfo_cls (term); + return GRUB_ERR_NONE; +} + /* GRUB Command. */ static grub_err_t diff --git a/include/grub/terminfo.h b/include/grub/terminfo.h index 8317995d8..5a552b327 100644 --- a/include/grub/terminfo.h +++ b/include/grub/terminfo.h @@ -56,6 +56,7 @@ struct grub_terminfo_output_state void (*put) (struct grub_term_output *term, const int c); }; +grub_err_t EXPORT_FUNC(grub_terminfo_output_init) (struct grub_term_output *term); void EXPORT_FUNC(grub_terminfo_gotoxy) (grub_term_output_t term, grub_uint8_t x, grub_uint8_t y); void EXPORT_FUNC(grub_terminfo_cls) (grub_term_output_t term);