Set default console on non-i386-pc

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-12-25 00:13:03 +01:00
parent 840f2e6e08
commit 4fc4ee303d
5 changed files with 17 additions and 20 deletions

View file

@ -351,8 +351,7 @@ static struct grub_term_output grub_console_term_output =
.setcolorstate = grub_console_setcolorstate, .setcolorstate = grub_console_setcolorstate,
.setcolor = grub_console_setcolor, .setcolor = grub_console_setcolor,
.getcolor = grub_console_getcolor, .getcolor = grub_console_getcolor,
.setcursor = grub_console_setcursor, .setcursor = grub_console_setcursor
.flags = GRUB_TERM_ACTIVE,
}; };
void void
@ -366,8 +365,8 @@ grub_console_init (void)
return; return;
} }
grub_term_register_input ("console", &grub_console_term_input); grub_term_register_input_active ("console", &grub_console_term_input);
grub_term_register_output ("console", &grub_console_term_output); grub_term_register_output_active ("console", &grub_console_term_output);
} }
void void

View file

@ -233,7 +233,11 @@ static struct grub_term_input grub_at_keyboard_term =
GRUB_MOD_INIT(at_keyboard) GRUB_MOD_INIT(at_keyboard)
{ {
#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU)
grub_term_register_input_active ("at_keyboard", &grub_at_keyboard_term);
#else
grub_term_register_input ("at_keyboard", &grub_at_keyboard_term); grub_term_register_input ("at_keyboard", &grub_at_keyboard_term);
#endif
} }
GRUB_MOD_FINI(at_keyboard) GRUB_MOD_FINI(at_keyboard)

View file

@ -163,19 +163,16 @@ static struct grub_term_output grub_vga_text_term =
.setcolorstate = grub_console_setcolorstate, .setcolorstate = grub_console_setcolorstate,
.setcolor = grub_console_setcolor, .setcolor = grub_console_setcolor,
.getcolor = grub_console_getcolor, .getcolor = grub_console_getcolor,
.setcursor = grub_vga_text_setcursor, .setcursor = grub_vga_text_setcursor
#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU)
.flags = GRUB_TERM_ACTIVE,
#endif
}; };
GRUB_MOD_INIT(vga_text) GRUB_MOD_INIT(vga_text)
{ {
#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU) #if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU)
grub_vga_text_init_fini (); grub_term_register_output_active ("vga_text", &grub_vga_text_term);
#endif #else
grub_term_register_output ("vga_text", &grub_vga_text_term); grub_term_register_output ("vga_text", &grub_vga_text_term);
#endif
} }
GRUB_MOD_FINI(vga_text) GRUB_MOD_FINI(vga_text)

View file

@ -414,15 +414,14 @@ static struct grub_term_output grub_ofconsole_term_output =
.setcolor = grub_ofconsole_setcolor, .setcolor = grub_ofconsole_setcolor,
.getcolor = grub_ofconsole_getcolor, .getcolor = grub_ofconsole_getcolor,
.setcursor = grub_ofconsole_setcursor, .setcursor = grub_ofconsole_setcursor,
.refresh = grub_ofconsole_refresh, .refresh = grub_ofconsole_refresh
.flags = GRUB_TERM_ACTIVE,
}; };
void void
grub_console_init (void) grub_console_init (void)
{ {
grub_term_register_input ("ofconsole", &grub_ofconsole_term_input); grub_term_register_input_active ("ofconsole", &grub_ofconsole_term_input);
grub_term_register_output ("ofconsole", &grub_ofconsole_term_output); grub_term_register_output_active ("ofconsole", &grub_ofconsole_term_output);
} }
void void

View file

@ -367,16 +367,14 @@ static struct grub_term_output grub_ncurses_term_output =
.setcolor = grub_ncurses_setcolor, .setcolor = grub_ncurses_setcolor,
.getcolor = grub_ncurses_getcolor, .getcolor = grub_ncurses_getcolor,
.setcursor = grub_ncurses_setcursor, .setcursor = grub_ncurses_setcursor,
.refresh = grub_ncurses_refresh, .refresh = grub_ncurses_refresh
.flags = GRUB_TERM_ACTIVE
}; };
void void
grub_console_init (void) grub_console_init (void)
{ {
grub_term_register_output ("console", &grub_ncurses_term_output); grub_term_register_output_active ("console", &grub_ncurses_term_output);
grub_term_register_input ("console", &grub_ncurses_term_input); grub_term_register_input_active ("console", &grub_ncurses_term_input);
grub_term_set_current_output (&grub_ncurses_term_output);
} }
void void