From: Alejandro Colomar Date: Sun, 9 Jun 2024 20:44:49 +0000 (+0200) Subject: ioctl_console.2, TIOCLINUX.2const: Split TIOCLINUX from ioctl_console(2) X-Git-Tag: man-pages-6.9~3^2~7^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aae1dd2be61a5b516614c2d0b68acefbc79add1f;p=thirdparty%2Fman-pages.git ioctl_console.2, TIOCLINUX.2const: Split TIOCLINUX from ioctl_console(2) Signed-off-by: Alejandro Colomar --- diff --git a/man/man2/ioctl_console.2 b/man/man2/ioctl_console.2 index 4c26aa52a..5ad576c12 100644 --- a/man/man2/ioctl_console.2 +++ b/man/man2/ioctl_console.2 @@ -661,193 +661,8 @@ Note that this does not change the videomode. See .BR resizecons (8). (Since Linux 1.3.3.) -.P -The action of the following ioctls depends on the first byte in the struct -pointed to by -.IR argp , -referred to here as the -.IR subcode . -These are legal only for the superuser or the owner of the current terminal. -Symbolic -.IR subcode s -are available in -.I -since -Linux 2.5.71. -.TP -.BR TIOCLINUX ", " subcode = 0 -Dump the screen. -Disappeared in Linux 1.1.92. -(With Linux 1.1.92 or later, read from -.I /dev/vcsN -or -.I /dev/vcsaN -instead.) -.TP -.BR TIOCLINUX ", " subcode = 1 -Get task information. -Disappeared in Linux 1.1.92. -.TP -.BR TIOCLINUX ", " subcode = TIOCL_SETSEL -Set selection. -.I argp -points to a -.IP -.in +4n -.EX -struct { - char subcode; - short xs, ys, xe, ye; - short sel_mode; -}; -.EE -.in -.IP -.I xs -and -.I ys -are the starting column and row. -.I xe -and -.I ye -are the ending -column and row. -(Upper left corner is row=column=1.) -.I sel_mode -is 0 for character-by-character selection, -1 for word-by-word selection, -or 2 for line-by-line selection. -The indicated screen characters are highlighted and saved -in a kernel buffer. -.IP -Since Linux 6.7, using this subcode requires the -.B CAP_SYS_ADMIN -capability. -.TP -.BR TIOCLINUX ", " subcode = TIOCL_PASTESEL -Paste selection. -The characters in the selection buffer are -written to -.IR fd . -.IP -Since Linux 6.7, using this subcode requires the -.B CAP_SYS_ADMIN -capability. -.TP -.BR TIOCLINUX ", " subcode = TIOCL_UNBLANKSCREEN -Unblank the screen. .TP -.BR TIOCLINUX ", " subcode = TIOCL_SELLOADLUT -Sets contents of a 256-bit look up table defining characters in a "word", -for word-by-word selection. -(Since Linux 1.1.32.) -.IP -Since Linux 6.7, using this subcode requires the -.B CAP_SYS_ADMIN -capability. -.TP -.BR TIOCLINUX ", " subcode = TIOCL_GETSHIFTSTATE -.I argp -points to a char which is set to the value of the kernel -variable -.IR shift_state . -(Since Linux 1.1.32.) -.TP -.BR TIOCLINUX ", " subcode = TIOCL_GETMOUSEREPORTING -.I argp -points to a char which is set to the value of the kernel -variable -.IR report_mouse . -(Since Linux 1.1.33.) -.TP -.BR TIOCLINUX ", " subcode = 8 -Dump screen width and height, cursor position, and all the -character-attribute pairs. -(Linux 1.1.67 through Linux 1.1.91 only. -With Linux 1.1.92 or later, read from -.I /dev/vcsa* -instead.) -.TP -.BR TIOCLINUX ", " subcode = 9 -Restore screen width and height, cursor position, and all the -character-attribute pairs. -(Linux 1.1.67 through Linux 1.1.91 only. -With Linux 1.1.92 or later, write to -.I /dev/vcsa* -instead.) -.TP -.BR TIOCLINUX ", " subcode = TIOCL_SETVESABLANK -Handles the Power Saving -feature of the new generation of monitors. -VESA screen blanking mode is set to -.IR argp[1] , -which governs what -screen blanking does: -.RS -.TP -.B 0 -Screen blanking is disabled. -.TP -.B 1 -The current video adapter -register settings are saved, then the controller is programmed to turn off -the vertical synchronization pulses. -This puts the monitor into "standby" mode. -If your monitor has an Off_Mode timer, then -it will eventually power down by itself. -.TP -.B 2 -The current settings are saved, then both the vertical and horizontal -synchronization pulses are turned off. -This puts the monitor into "off" mode. -If your monitor has no Off_Mode timer, -or if you want your monitor to power down immediately when the -blank_timer times out, then you choose this option. -.RI ( Caution: -Powering down frequently will damage the monitor.) -(Since Linux 1.1.76.) -.RE -.TP -.BR TIOCLINUX ", " subcode = TIOCL_SETKMSGREDIRECT -Change target of kernel messages ("console"): -by default, and if this is set to -.BR 0 , -messages are written to the currently active VT. -The VT to write to is a single byte following -.BR subcode . -(Since Linux 2.5.36.) -.TP -.BR TIOCLINUX ", " subcode = TIOCL_GETFGCONSOLE -Returns the number of VT currently in foreground. -(Since Linux 2.5.36.) -.TP -.BR TIOCLINUX ", " subcode = TIOCL_SCROLLCONSOLE -Scroll the foreground VT by the specified amount of -.I lines -down, -or half the screen if -.BR 0 . -.I lines -is *(((int32_t *)&subcode) + 1). -(Since Linux 2.5.67.) -.TP -.BR TIOCLINUX ", " subcode = TIOCL_BLANKSCREEN -Blank the foreground VT, ignoring "pokes" (typing): -can only be unblanked explicitly (by switching VTs, to text mode, etc.). -(Since Linux 2.5.71.) -.TP -.BR TIOCLINUX ", " subcode = TIOCL_BLANKEDSCREEN -Returns the number of VT currently blanked, -.B 0 -if none. -(Since Linux 2.5.71.) -.TP -.BR TIOCLINUX ", " subcode = 16 -Never used. -.TP -.BR TIOCLINUX ", " subcode = TIOCL_GETKMSGREDIRECT -Returns target of kernel messages. -(Since Linux 2.6.17.) +.B TIOCLINUX .SH RETURN VALUE On success, 0 is returned (except where indicated). On failure, \-1 is returned, and @@ -866,9 +681,6 @@ is invalid. .B ENOTTY The file descriptor is not associated with a character special device, or the specified operation does not apply to it. -.TP -.B EPERM -Insufficient permission. .SH NOTES .BR Warning : Do not regard this man page as documentation of the Linux console ioctls. @@ -892,6 +704,7 @@ on future versions of Linux. .P Use POSIX functions. .SH SEE ALSO +.BR TIOCLINUX (2const), .BR dumpkeys (1), .BR kbd_mode (1), .BR loadkeys (1), diff --git a/man/man2const/TIOCLINUX.2const b/man/man2const/TIOCLINUX.2const new file mode 100644 index 000000000..446800b9f --- /dev/null +++ b/man/man2const/TIOCLINUX.2const @@ -0,0 +1,223 @@ +.\" Copyright (c) 1995 Jim Van Zandt and aeb +.\" Sun Feb 26 11:46:23 MET 1995 +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" Modified, Sun Feb 26 15:04:20 1995, faith@cs.unc.edu +.\" Modified, Thu Apr 20 22:08:17 1995, jrv@vanzandt.mv.com +.\" Modified, Mon Sep 18 22:32:47 1995, hpa@storm.net (H. Peter Anvin) +.\" +.TH TIOCLINUX 2const (date) "Linux man-pages (unreleased)" +.SH NAME +TIOCLINUX +\- +ioctls for console terminal and virtual consoles +.SH SYNOPSIS +.nf +.B #include +.P +.BI "int ioctl(int " fd ", TIOCLINUX, void *" argp ); +.fi +.SH DESCRIPTION +The action of the following ioctls depends on the first byte in the struct +pointed to by +.IR argp , +referred to here as the +.IR subcode . +These are legal only for the superuser or the owner of the current terminal. +Symbolic +.IR subcode s +are available in +.I +since +Linux 2.5.71. +.TP +.BR TIOCLINUX ", " subcode = 0 +Dump the screen. +Disappeared in Linux 1.1.92. +(With Linux 1.1.92 or later, read from +.I /dev/vcsN +or +.I /dev/vcsaN +instead.) +.TP +.BR TIOCLINUX ", " subcode = 1 +Get task information. +Disappeared in Linux 1.1.92. +.TP +.BR TIOCLINUX ", " subcode = TIOCL_SETSEL +Set selection. +.I argp +points to a +.IP +.in +4n +.EX +struct { + char subcode; + short xs, ys, xe, ye; + short sel_mode; +}; +.EE +.in +.IP +.I xs +and +.I ys +are the starting column and row. +.I xe +and +.I ye +are the ending +column and row. +(Upper left corner is row=column=1.) +.I sel_mode +is 0 for character-by-character selection, +1 for word-by-word selection, +or 2 for line-by-line selection. +The indicated screen characters are highlighted and saved +in a kernel buffer. +.IP +Since Linux 6.7, using this subcode requires the +.B CAP_SYS_ADMIN +capability. +.TP +.BR TIOCLINUX ", " subcode = TIOCL_PASTESEL +Paste selection. +The characters in the selection buffer are +written to +.IR fd . +.IP +Since Linux 6.7, using this subcode requires the +.B CAP_SYS_ADMIN +capability. +.TP +.BR TIOCLINUX ", " subcode = TIOCL_UNBLANKSCREEN +Unblank the screen. +.TP +.BR TIOCLINUX ", " subcode = TIOCL_SELLOADLUT +Sets contents of a 256-bit look up table defining characters in a "word", +for word-by-word selection. +(Since Linux 1.1.32.) +.IP +Since Linux 6.7, using this subcode requires the +.B CAP_SYS_ADMIN +capability. +.TP +.BR TIOCLINUX ", " subcode = TIOCL_GETSHIFTSTATE +.I argp +points to a char which is set to the value of the kernel +variable +.IR shift_state . +(Since Linux 1.1.32.) +.TP +.BR TIOCLINUX ", " subcode = TIOCL_GETMOUSEREPORTING +.I argp +points to a char which is set to the value of the kernel +variable +.IR report_mouse . +(Since Linux 1.1.33.) +.TP +.BR TIOCLINUX ", " subcode = 8 +Dump screen width and height, cursor position, and all the +character-attribute pairs. +(Linux 1.1.67 through Linux 1.1.91 only. +With Linux 1.1.92 or later, read from +.I /dev/vcsa* +instead.) +.TP +.BR TIOCLINUX ", " subcode = 9 +Restore screen width and height, cursor position, and all the +character-attribute pairs. +(Linux 1.1.67 through Linux 1.1.91 only. +With Linux 1.1.92 or later, write to +.I /dev/vcsa* +instead.) +.TP +.BR TIOCLINUX ", " subcode = TIOCL_SETVESABLANK +Handles the Power Saving +feature of the new generation of monitors. +VESA screen blanking mode is set to +.IR argp[1] , +which governs what +screen blanking does: +.RS +.TP +.B 0 +Screen blanking is disabled. +.TP +.B 1 +The current video adapter +register settings are saved, then the controller is programmed to turn off +the vertical synchronization pulses. +This puts the monitor into "standby" mode. +If your monitor has an Off_Mode timer, then +it will eventually power down by itself. +.TP +.B 2 +The current settings are saved, then both the vertical and horizontal +synchronization pulses are turned off. +This puts the monitor into "off" mode. +If your monitor has no Off_Mode timer, +or if you want your monitor to power down immediately when the +blank_timer times out, then you choose this option. +.RI ( Caution: +Powering down frequently will damage the monitor.) +(Since Linux 1.1.76.) +.RE +.TP +.BR TIOCLINUX ", " subcode = TIOCL_SETKMSGREDIRECT +Change target of kernel messages ("console"): +by default, and if this is set to +.BR 0 , +messages are written to the currently active VT. +The VT to write to is a single byte following +.BR subcode . +(Since Linux 2.5.36.) +.TP +.BR TIOCLINUX ", " subcode = TIOCL_GETFGCONSOLE +Returns the number of VT currently in foreground. +(Since Linux 2.5.36.) +.TP +.BR TIOCLINUX ", " subcode = TIOCL_SCROLLCONSOLE +Scroll the foreground VT by the specified amount of +.I lines +down, +or half the screen if +.BR 0 . +.I lines +is *(((int32_t *)&subcode) + 1). +(Since Linux 2.5.67.) +.TP +.BR TIOCLINUX ", " subcode = TIOCL_BLANKSCREEN +Blank the foreground VT, ignoring "pokes" (typing): +can only be unblanked explicitly (by switching VTs, to text mode, etc.). +(Since Linux 2.5.71.) +.TP +.BR TIOCLINUX ", " subcode = TIOCL_BLANKEDSCREEN +Returns the number of VT currently blanked, +.B 0 +if none. +(Since Linux 2.5.71.) +.TP +.BR TIOCLINUX ", " subcode = 16 +Never used. +.TP +.BR TIOCLINUX ", " subcode = TIOCL_GETKMSGREDIRECT +Returns target of kernel messages. +(Since Linux 2.6.17.) +.SH RETURN VALUE +On success, 0 is returned (except where indicated). +On failure, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I argp +is invalid. +.TP +.B EPERM +Insufficient permission. +.SH SEE ALSO +.BR ioctl (2), +.BR ioctl_console (2)