]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Set default console on non-i386-pc
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 24 Dec 2009 23:13:03 +0000 (00:13 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 24 Dec 2009 23:13:03 +0000 (00:13 +0100)
term/efi/console.c
term/i386/pc/at_keyboard.c
term/i386/pc/vga_text.c
term/ieee1275/ofconsole.c
util/console.c

index bde101ebc09a0b6859083ae496ab0f659f7eb539..dc07c401e644f891352e4cac90fc76f0bc7a541d 100644 (file)
@@ -351,8 +351,7 @@ static struct grub_term_output grub_console_term_output =
     .setcolorstate = grub_console_setcolorstate,
     .setcolor = grub_console_setcolor,
     .getcolor = grub_console_getcolor,
-    .setcursor = grub_console_setcursor,
-    .flags = GRUB_TERM_ACTIVE,
+    .setcursor = grub_console_setcursor
   };
 
 void
@@ -366,8 +365,8 @@ grub_console_init (void)
       return;
     }
 
-  grub_term_register_input ("console", &grub_console_term_input);
-  grub_term_register_output ("console", &grub_console_term_output);
+  grub_term_register_input_active ("console", &grub_console_term_input);
+  grub_term_register_output_active ("console", &grub_console_term_output);
 }
 
 void
index cf30e72427cf7515acbf417f05eb8ee77aae79a3..379cb3a4bade56148ed5fac9fa2ad78a5b2bb581 100644 (file)
@@ -233,7 +233,11 @@ static struct grub_term_input grub_at_keyboard_term =
 
 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);
+#endif
 }
 
 GRUB_MOD_FINI(at_keyboard)
index 4fc54a60d88cb960d37699c946b47eb17df3b540..01191cef0da80b598e731c714c978ccc348907e3 100644 (file)
@@ -163,19 +163,16 @@ static struct grub_term_output grub_vga_text_term =
     .setcolorstate = grub_console_setcolorstate,
     .setcolor = grub_console_setcolor,
     .getcolor = grub_console_getcolor,
-    .setcursor = grub_vga_text_setcursor,
-#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU)
-    .flags = GRUB_TERM_ACTIVE,
-#endif
+    .setcursor = grub_vga_text_setcursor
   };
 
 GRUB_MOD_INIT(vga_text)
 {
 #if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU)
-  grub_vga_text_init_fini ();
-#endif
-
+  grub_term_register_output_active ("vga_text", &grub_vga_text_term);
+#else
   grub_term_register_output ("vga_text", &grub_vga_text_term);
+#endif
 }
 
 GRUB_MOD_FINI(vga_text)
index 95479379e2a78f832bb745c2d281b30b386ed95a..f5db7c146243bd1687e4294bb63bf71b5d34a364 100644 (file)
@@ -414,15 +414,14 @@ static struct grub_term_output grub_ofconsole_term_output =
     .setcolor = grub_ofconsole_setcolor,
     .getcolor = grub_ofconsole_getcolor,
     .setcursor = grub_ofconsole_setcursor,
-    .refresh = grub_ofconsole_refresh,
-    .flags = GRUB_TERM_ACTIVE,
+    .refresh = grub_ofconsole_refresh
   };
 
 void
 grub_console_init (void)
 {
-  grub_term_register_input ("ofconsole", &grub_ofconsole_term_input);
-  grub_term_register_output ("ofconsole", &grub_ofconsole_term_output);
+  grub_term_register_input_active ("ofconsole", &grub_ofconsole_term_input);
+  grub_term_register_output_active ("ofconsole", &grub_ofconsole_term_output);
 }
 
 void
index be64eb9d8a266287eeded0281b0c37c71011ee53..40ee3a638b93a3bcc42a623e27b496e28ac45b2a 100644 (file)
@@ -367,16 +367,14 @@ static struct grub_term_output grub_ncurses_term_output =
     .setcolor = grub_ncurses_setcolor,
     .getcolor = grub_ncurses_getcolor,
     .setcursor = grub_ncurses_setcursor,
-    .refresh = grub_ncurses_refresh,
-    .flags = GRUB_TERM_ACTIVE
+    .refresh = grub_ncurses_refresh
   };
 
 void
 grub_console_init (void)
 {
-  grub_term_register_output ("console", &grub_ncurses_term_output);
-  grub_term_register_input ("console", &grub_ncurses_term_input);
-  grub_term_set_current_output (&grub_ncurses_term_output);
+  grub_term_register_output_active ("console", &grub_ncurses_term_output);
+  grub_term_register_input_active ("console", &grub_ncurses_term_input);
 }
 
 void