]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Run terminfo_cls on initing terminfo output to clear the screen and
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 5 Jan 2011 11:23:06 +0000 (12:23 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 5 Jan 2011 11:23:06 +0000 (12:23 +0100)
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.

ChangeLog
grub-core/term/ieee1275/ofconsole.c
grub-core/term/serial.c
grub-core/term/terminfo.c
include/grub/terminfo.h

index 50da0e678f0a5f582e370096ca1c754ce3829718..0159aab3d6e9bfc0a599839df1457a60d0d2adaf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-01-05  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       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  <phcoder@gmail.com>
 
        * util/grub-install.in: Determine ofpathname, nvsetenv and efibootmgr
index 2b0bddbbb2bc6eff778703d96a904fe4b6fabd07..ab74f21da99e6085031cd4d1c6e29e409121b0c2 100644 (file)
@@ -170,6 +170,8 @@ grub_ofconsole_init_output (struct grub_term_output *term)
 
   grub_ofconsole_dimensions ();
 
+  grub_terminfo_output_init (term);
+
   return 0;
 }
 
index d36388359ac42e15a37b4fa57326bbe3fd2e106d..e672a89d643c54289282873240b1818da13e36e4 100644 (file)
@@ -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,
index 8450ea231b2d539145655e09e78f79e94000babd..0a8c75c740f3ce8d766030a0084e90789563d458 100644 (file)
@@ -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
index 8317995d85cf28e2cb9b1c097a276bdcf9a025e1..5a552b3277541a7b4a1e32a8eb073f943949772c 100644 (file)
@@ -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);