svn commit: r322575 - in head/sys: dev/syscons sys

Bruce Evans bde at FreeBSD.org
Wed Aug 16 10:59:38 UTC 2017


Author: bde
Date: Wed Aug 16 10:59:37 2017
New Revision: 322575
URL: https://svnweb.freebsd.org/changeset/base/322575

Log:
  Undeprecate the CONS_CURSORTYPE ioctl.  It was "deprecated" in 2001,
  but it was actually extended then and it is still used (just once) in
  /usr/src by its primary user (vidcontrol), while its replacement is
  still not used in /usr/src.
  
  yokota became inactive soon after deprecating CONS_CURSORTYPE (this
  was part of a large change to make cursor attributes per-vty).
  
  vidcontrol has incomplete support even for the old ioctl.  I will
  update it soon.  Then there are many broken escape sequences to fix.
  This is just to prepare for setting cursor colors using vidcontrol.

Modified:
  head/sys/dev/syscons/syscons.c
  head/sys/sys/consio.h

Modified: head/sys/dev/syscons/syscons.c
==============================================================================
--- head/sys/dev/syscons/syscons.c	Wed Aug 16 10:38:06 2017	(r322574)
+++ head/sys/dev/syscons/syscons.c	Wed Aug 16 10:59:37 2017	(r322575)
@@ -934,7 +934,7 @@ sctty_ioctl(struct tty *tp, u_long cmd, caddr_t data, 
 	splx(s);
 	return 0;
 
-    case CONS_CURSORTYPE:   	/* set cursor type (obsolete) */
+    case CONS_CURSORTYPE:   	/* set cursor type (old interface + HIDDEN) */
 	s = spltty();
 	*(int *)data &= CONS_CURSOR_ATTRS;
 	sc_change_cursor_shape(scp, *(int *)data, -1, -1);

Modified: head/sys/sys/consio.h
==============================================================================
--- head/sys/sys/consio.h	Wed Aug 16 10:38:06 2017	(r322574)
+++ head/sys/sys/consio.h	Wed Aug 16 10:59:37 2017	(r322575)
@@ -103,11 +103,15 @@ typedef struct ssaver	ssaver_t;
 #define CONS_SSAVER	_IOW('c', 5, ssaver_t)
 #define CONS_GSAVER	_IOWR('c', 6, ssaver_t)
 
-/* set the text cursor type (obsolete, see CONS_CURSORSHAPE below) */
 /*
-#define CONS_BLINK_CURSOR (1 << 0)
-#define CONS_CHAR_CURSOR (1 << 1)
-*/
+ * Set the text cursor type.
+ *
+ * This is an old interface extended to support the CONS_HIDDEN_CURSOR bit.
+ * New code should use CONS_CURSORSHAPE.  CONS_CURSOR_ATTRS gives the 3
+ * bits supported by the (extended) old interface.  The old interface is
+ * especially unusable for hiding the cursor (even with its extension)
+ * since it changes the cursor on all vtys.
+ */
 #define CONS_CURSORTYPE	_IOW('c', 7, int)
 
 /* set the bell type to audible or visual */


More information about the svn-src-head mailing list