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.
This commit is contained in:
Bruce Evans 2017-08-16 10:59:37 +00:00
parent 2164af29a0
commit 60e47915b4
2 changed files with 9 additions and 5 deletions

View File

@ -934,7 +934,7 @@ sctty_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
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);

View File

@ -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 */