File: ioctl_console.2

package info (click to toggle)
manpages 6.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,184 kB
  • sloc: sh: 575; python: 222; perl: 190; makefile: 29; lisp: 22
file content (170 lines) | stat: -rw-r--r-- 3,194 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
.\" Copyright, the authors of the Linux man-pages project
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.TH ioctl_console 2 2025-05-17 "Linux man-pages (unreleased)"
.SH NAME
ioctl_console \- ioctls for console terminal and virtual consoles
.SH SYNOPSIS
.nf
.B #include <sys/ioctl.h>
.P
.BI "int ioctl(int " fd ", unsigned long " op ", ...);"
.fi
.SH DESCRIPTION
The following Linux-specific
.BR ioctl (2)
operations are supported for console terminals and virtual consoles.
.TP
.BR KDGETLED (2const)
.TQ
.BR KDSETLED (2const)
.TQ
.BR KDGKBLED (2const)
.TQ
.BR KDSKBLED (2const)
.TQ
.BR KDGKBTYPE (2const)
.TQ
.BR KDADDIO (2const)
.TQ
.BR KDDELIO (2const)
.TQ
.BR KDENABIO (2const)
.TQ
.BR KDDISABIO (2const)
.TQ
.BR KDSETMODE (2const)
.TQ
.BR KDGETMODE (2const)
.TQ
.BR KDMKTONE (2const)
.TQ
.BR KIOCSOUND (2const)
.TQ
.BR GIO_CMAP (2const)
.TQ
.BR PIO_CMAP (2const)
.TQ
.BR GIO_FONT (2const)
.TQ
.BR GIO_FONTX (2const)
.TQ
.BR PIO_FONT (2const)
.TQ
.BR PIO_FONTX (2const)
.TQ
.BR PIO_FONTRESET (2const)
.TQ
.BR GIO_SCRNMAP (2const)
.TQ
.BR GIO_UNISCRNMAP (2const)
.TQ
.BR PIO_SCRNMAP (2const)
.TQ
.BR PIO_UNISCRNMAP (2const)
.TQ
.BR GIO_UNIMAP (2const)
.TQ
.BR PIO_UNIMAP (2const)
.TQ
.BR PIO_UNIMAPCLR (2const)
.TQ
.BR KDGKBMODE (2const)
.TQ
.BR KDSKBMODE (2const)
.TQ
.BR KDGKBMETA (2const)
.TQ
.BR KDSKBMETA (2const)
.TQ
.BR KDGKBENT (2const)
.TQ
.BR KDSKBENT (2const)
.TQ
.BR KDGKBSENT (2const)
.TQ
.BR KDSKBSENT (2const)
.TQ
.BR KDGKBDIACR (2const)
.TQ
.BR KDGETKEYCODE (2const)
.TQ
.BR KDSETKEYCODE (2const)
.TQ
.BR KDSIGACCEPT (2const)
See
.BR ioctl_kd (2).
.TP
.BR TIOCLINUX (2const)
.TP
.BR VT_OPENQRY (2const)
.TQ
.BR VT_GETMODE (2const)
.TQ
.BR VT_SETMODE (2const)
.TQ
.BR VT_GETSTATE (2const)
.TQ
.BR VT_RELDISP (2const)
.TQ
.BR VT_ACTIVATE (2const)
.TQ
.BR VT_WAITACTIVE (2const)
.TQ
.BR VT_DISALLOCATE (2const)
.TQ
.BR VT_RESIZE (2const)
.TQ
.BR VT_RESIZEX (2const)
See
.BR ioctl_vt (2).
.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 STANDARDS
Linux.
.SH CAVEATS
Do not regard this man page as documentation of the Linux console ioctls.
This is provided for the curious only, as an alternative to reading the
source.
Ioctl's are undocumented Linux internals, liable to be changed
without warning.
(And indeed, this page more or less describes the
situation as of kernel version 1.1.94;
there are many minor and not-so-minor
differences with earlier versions.)
.P
Very often, ioctls are introduced for communication between the
kernel and one particular well-known program (fdisk, hdparm, setserial,
tunelp, loadkeys, selection, setfont, etc.), and their behavior will be
changed when required by this particular program.
.SH SEE ALSO
.BR ioctl (2),
.BR TIOCLINUX (2const),
.BR ioctl_kd (2),
.BR ioctl_vt (2),
.BR dumpkeys (1),
.BR kbd_mode (1),
.BR loadkeys (1),
.BR mknod (1),
.BR setleds (1),
.BR setmetamode (1),
.BR execve (2),
.BR fcntl (2),
.BR ioctl_tty (2),
.BR ioperm (2),
.BR termios (3),
.BR console_codes (4),
.BR mt (4),
.BR sd (4),
.BR tty (4),
.BR ttyS (4),
.BR vcs (4),
.BR vcsa (4),
.BR charsets (7),
.BR mapscrn (8),
.BR resizecons (8),
.BR setfont (8)