]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-08-03 Robert Millan <rmh@aybabtu.com>
authorrobertmh <robertmh@localhost>
Sun, 3 Aug 2008 17:09:21 +0000 (17:09 +0000)
committerrobertmh <robertmh@localhost>
Sun, 3 Aug 2008 17:09:21 +0000 (17:09 +0000)
        * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
        (grub_console_setcursor): Make it possible to set cursor off.

ChangeLog
term/i386/pc/vga_text.c

index e60ca752a16dec8b49eb17abd0114fe9db435e42..e7d577ee8c74b1bbbb5c587b7a8c4bb9df9e420b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-03  Robert Millan  <rmh@aybabtu.com>
+
+       * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
+       (grub_console_setcursor): Make it possible to set cursor off.
+
 2008-08-03  Robert Millan  <rmh@aybabtu.com>
 
        * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
index 58a3c6c2ea42496d9e2294b4eedfed04f95d49c0..ec3c0f56534394b53b9a0d3372a8f8d240a6b995 100644 (file)
@@ -34,6 +34,8 @@ static int grub_curr_x, grub_curr_y;
 #define CRTC_CURSOR_ADDR_HIGH  0x0e
 #define CRTC_CURSOR_ADDR_LOW   0x0f
 
+#define CRTC_CURSOR_DISABLE    (1 << 5)
+
 static void
 screen_write_char (int x, int y, short c)
 {
@@ -133,5 +135,8 @@ grub_console_setcursor (int on)
   grub_uint8_t old;
   grub_outb (CRTC_CURSOR, CRTC_ADDR_PORT);
   old = grub_inb (CRTC_DATA_PORT);
-  grub_outb ((old & ~(on << 5)), CRTC_DATA_PORT);
+  if (on)
+    grub_outb (old & ~CRTC_CURSOR_DISABLE, CRTC_DATA_PORT);
+  else
+    grub_outb (old | CRTC_CURSOR_DISABLE, CRTC_DATA_PORT);
 }