]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Disable EFI cursor when the EFI console becomes inactive.
authorColin Watson <cjwatson@ubuntu.com>
Tue, 20 Jul 2010 21:00:18 +0000 (22:00 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Tue, 20 Jul 2010 21:00:18 +0000 (22:00 +0100)
* term/efi/console.c (grub_efi_console_init): New function.
(grub_efi_console_fini): New function.
(grub_console_term_output): Register init and fini methods.

ChangeLog
term/efi/console.c

index 5e3b7ff04379454181f9ff3046caa6c5b58fe7b4..681b6fd2415ed154b2317117e151a102fa1d6f02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-07-20  Colin Watson  <cjwatson@ubuntu.com>
+
+       Disable EFI cursor when the EFI console becomes inactive.
+
+       * term/efi/console.c (grub_efi_console_init): New function.
+       (grub_efi_console_fini): New function.
+       (grub_console_term_output): Register init and fini methods.
+
 2010-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * tests/util/grub-shell-tester.in: Remove bashism and declare as
index d3240590b5b000a134f836a1d768847c12c44b75..dca0029101ce2f9d072d55a2c4cd4b628b4cae66 100644 (file)
@@ -311,6 +311,20 @@ grub_console_setcursor (struct grub_term_output *term __attribute__ ((unused)),
   efi_call_2 (o->enable_cursor, o, on);
 }
 
+static grub_err_t
+grub_efi_console_init (struct grub_term_output *term)
+{
+  grub_console_setcursor (term, 1);
+  return 0;
+}
+
+static grub_err_t
+grub_efi_console_fini (struct grub_term_output *term)
+{
+  grub_console_setcursor (term, 0);
+  return 0;
+}
+
 static struct grub_term_input grub_console_term_input =
   {
     .name = "console",
@@ -321,6 +335,8 @@ static struct grub_term_input grub_console_term_input =
 static struct grub_term_output grub_console_term_output =
   {
     .name = "console",
+    .init = grub_efi_console_init,
+    .fini = grub_efi_console_fini,
     .putchar = grub_console_putchar,
     .getwh = grub_console_getwh,
     .getxy = grub_console_getxy,