Restrict terminfo to serial

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-12-24 23:20:43 +01:00
parent 686ff5b4d1
commit 9f0cd916a4
3 changed files with 29 additions and 26 deletions

View file

@ -30,6 +30,7 @@
#define TEXT_WIDTH 80
#define TEXT_HEIGHT 25
static struct grub_term_output grub_serial_term_output;
static unsigned int xpos, ypos;
static unsigned int keep_track = 1;
static unsigned int registered = 0;
@ -413,7 +414,7 @@ grub_serial_gotoxy (grub_uint8_t x, grub_uint8_t y)
else
{
keep_track = 0;
grub_terminfo_gotoxy (x, y);
grub_terminfo_gotoxy (x, y, &grub_serial_term_output);
keep_track = 1;
xpos = x;
@ -425,7 +426,7 @@ static void
grub_serial_cls (void)
{
keep_track = 0;
grub_terminfo_cls ();
grub_terminfo_cls (&grub_serial_term_output);
keep_track = 1;
xpos = ypos = 0;
@ -439,10 +440,10 @@ grub_serial_setcolorstate (const grub_term_color_state state)
{
case GRUB_TERM_COLOR_STANDARD:
case GRUB_TERM_COLOR_NORMAL:
grub_terminfo_reverse_video_off ();
grub_terminfo_reverse_video_off (&grub_serial_term_output);
break;
case GRUB_TERM_COLOR_HIGHLIGHT:
grub_terminfo_reverse_video_on ();
grub_terminfo_reverse_video_on (&grub_serial_term_output);
break;
default:
break;
@ -454,9 +455,9 @@ static void
grub_serial_setcursor (const int on)
{
if (on)
grub_terminfo_cursor_on ();
grub_terminfo_cursor_on (&grub_serial_term_output);
else
grub_terminfo_cursor_off ();
grub_terminfo_cursor_off (&grub_serial_term_output);
}
static struct grub_term_input grub_serial_term_input =