Skip to contentSkip to conversation

vt100 cursor on and off sequences

PATCH In review Michael Gorven 2 participants 2 messages May 31, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vt100 cursor on and off sequences

I've been testing GRUB using the serial terminal and noticed that there was no cursor (and that my terminal window also lost its cursor after running GRUB). I looked into this today and found that the escape sequences for turning the cursor on and off were the wrong way round. The attached patch fixes this so that the serial terminal now has a cursor :-)

Michael

Signature · 3 lines
http://michael.gorven.za.net
PGP Key ID 6612FE85
S/MIME Key ID D33AEB31
ChangeLog +5 -0
diff -rN -u old-grub-devel/ChangeLog new-grub-devel/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-31  Michael Gorven  <[email protected]>
+
+	* term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
+	on and off sequences.
+
 2008-05-31  Robert Millan  <[email protected]>
 
 	* util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
term/terminfo.c +2 -2
diff -rN -u old-grub-devel/term/terminfo.c new-grub-devel/term/terminfo.c
@@ -98,8 +98,8 @@
       term.cls               = grub_strdup ("\e[H\e[J");
       term.reverse_video_on  = grub_strdup ("\e[7m");
       term.reverse_video_off = grub_strdup ("\e[m");
-      term.cursor_on         = grub_strdup ("\e[?25l");
-      term.cursor_off        = grub_strdup ("\e[?25h");
+      term.cursor_on         = grub_strdup ("\e[?25h");
+      term.cursor_off        = grub_strdup ("\e[?25l");
       return grub_errno;
     }
   
#1 lore raw
Quoted 5 lines · Michael Gorven

I've been testing GRUB using the serial terminal and noticed that there was no cursor (and that my terminal window also lost its cursor after running GRUB). I looked into this today and found that the escape sequences for turning the cursor on and off were the wrong way round. The attached patch fixes this so that the serial terminal now has a cursor :-)

Committed; thanks!

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)