Revision: 1909
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1909
Author: robertmh
Date: 2008-11-11 23:16:54 +0000 (Tue, 11 Nov 2008)
Log Message:
-----------
2008-11-12 Robert Millan <[EMAIL PROTECTED]>
Fix a regression introduced by the at_keyboard.mod split. Because
some terminals are default on some platforms and non-default on
others, the first terminal being registered determines which is
going to be default.
* kern/term.c (grub_term_register_input): If this is the first
terminal being registered, set it as the current one.
(grub_term_register_output): Likewise.
* term/efi/console.c (grub_console_init): Do not call
grub_term_set_current_output() or grub_term_set_current_input().
* term/ieee1275/ofconsole.c (grub_console_init): Likewise.
* term/i386/pc/console.c (grub_console_init): Likewise.
(grub_console_fini): Do not call grub_term_set_current_input()
(but leave grub_term_set_current_output() to restore text mode).
Modified Paths:
--------------
trunk/grub2/ChangeLog
trunk/grub2/kern/term.c
trunk/grub2/term/efi/console.c
trunk/grub2/term/i386/pc/console.c
trunk/grub2/term/ieee1275/ofconsole.c
Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog 2008-11-10 15:04:00 UTC (rev 1908)
+++ trunk/grub2/ChangeLog 2008-11-11 23:16:54 UTC (rev 1909)
@@ -1,3 +1,21 @@
+2008-11-12 Robert Millan <[EMAIL PROTECTED]>
+
+ Fix a regression introduced by the at_keyboard.mod split. Because
+ some terminals are default on some platforms and non-default on
+ others, the first terminal being registered determines which is
+ going to be default.
+
+ * kern/term.c (grub_term_register_input): If this is the first
+ terminal being registered, set it as the current one.
+ (grub_term_register_output): Likewise.
+
+ * term/efi/console.c (grub_console_init): Do not call
+ grub_term_set_current_output() or grub_term_set_current_input().
+ * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
+ * term/i386/pc/console.c (grub_console_init): Likewise.
+ (grub_console_fini): Do not call grub_term_set_current_input()
+ (but leave grub_term_set_current_output() to restore text mode).
+
2008-11-10 Robert Millan <[EMAIL PROTECTED]>
* util/grub.d/00_header.in: Add backward compatibility check for
Modified: trunk/grub2/kern/term.c
===================================================================
--- trunk/grub2/kern/term.c 2008-11-10 15:04:00 UTC (rev 1908)
+++ trunk/grub2/kern/term.c 2008-11-11 23:16:54 UTC (rev 1909)
@@ -44,6 +44,8 @@
{
term->next = grub_term_list_input;
grub_term_list_input = term;
+ if (! grub_cur_term_input)
+ grub_term_set_current_input (term);
}
void
@@ -51,6 +53,8 @@
{
term->next = grub_term_list_output;
grub_term_list_output = term;
+ if (! grub_cur_term_output)
+ grub_term_set_current_output (term);
}
void
Modified: trunk/grub2/term/efi/console.c
===================================================================
--- trunk/grub2/term/efi/console.c 2008-11-10 15:04:00 UTC (rev 1908)
+++ trunk/grub2/term/efi/console.c 2008-11-11 23:16:54 UTC (rev 1909)
@@ -368,8 +368,6 @@
grub_term_register_input (&grub_console_term_input);
grub_term_register_output (&grub_console_term_output);
- grub_term_set_current_output (&grub_console_term_output);
- grub_term_set_current_input (&grub_console_term_input);
}
void
Modified: trunk/grub2/term/i386/pc/console.c
===================================================================
--- trunk/grub2/term/i386/pc/console.c 2008-11-10 15:04:00 UTC (rev 1908)
+++ trunk/grub2/term/i386/pc/console.c 2008-11-11 23:16:54 UTC (rev 1909)
@@ -156,19 +156,19 @@
grub_console_init (void)
{
grub_term_register_output (&grub_console_term_output);
- grub_term_set_current_output (&grub_console_term_output);
#ifdef GRUB_MACHINE_PCBIOS
grub_term_register_input (&grub_console_term_input);
- grub_term_set_current_input (&grub_console_term_input);
#endif
}
void
grub_console_fini (void)
{
+ /* This is to make sure the console is restored to text mode before
+ we boot. */
grub_term_set_current_output (&grub_console_term_output);
+
#ifdef GRUB_MACHINE_PCBIOS
- grub_term_set_current_input (&grub_console_term_input);
grub_term_unregister_input (&grub_console_term_input);
#endif
grub_term_unregister_output (&grub_console_term_output);
Modified: trunk/grub2/term/ieee1275/ofconsole.c
===================================================================
--- trunk/grub2/term/ieee1275/ofconsole.c 2008-11-10 15:04:00 UTC (rev
1908)
+++ trunk/grub2/term/ieee1275/ofconsole.c 2008-11-11 23:16:54 UTC (rev
1909)
@@ -422,8 +422,6 @@
{
grub_term_register_input (&grub_ofconsole_term_input);
grub_term_register_output (&grub_ofconsole_term_output);
- grub_term_set_current_output (&grub_ofconsole_term_output);
- grub_term_set_current_input (&grub_ofconsole_term_input);
}
void