]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/ioctl_console.2
fuse.4: ffix
[thirdparty/man-pages.git] / man2 / ioctl_console.2
1 .\" Copyright (c) 1995 Jim Van Zandt <jrv@vanzandt.mv.com> and aeb
2 .\" Sun Feb 26 11:46:23 MET 1995
3 .\"
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, see
22 .\" <http://www.gnu.org/licenses/>.
23 .\" %%%LICENSE_END
24 .\"
25 .\" Modified, Sun Feb 26 15:04:20 1995, faith@cs.unc.edu
26 .\" Modified, Thu Apr 20 22:08:17 1995, jrv@vanzandt.mv.com
27 .\" Modified, Mon Sep 18 22:32:47 1995, hpa@storm.net (H. Peter Anvin)
28 .\" FIXME The following are not documented:
29 .\" KDFONTOP (since 2.1.111)
30 .\" KDGKBDIACRUC (since 2.6.24)
31 .\" KDSKBDIACR
32 .\" KDSKBDIACRUC (since 2.6.24)
33 .\" KDKBDREP (since 2.1.113)
34 .\" KDMAPDISP (not implemented as at 2.6.27)
35 .\" KDUNMAPDISP (not implemented as at 2.6.27)
36 .\" VT_LOCKSWITCH (since 1.3.47, needs CAP_SYS_TTY_CONFIG)
37 .\" VT_UNLOCKSWITCH (since 1.3.47, needs CAP_SYS_TTY_CONFIG)
38 .\" VT_GETHIFONTMASK (since 2.6.18)
39 .\"
40 .TH IOCTL_CONSOLE 2 2017-09-15 "Linux" "Linux Programmer's Manual"
41 .SH NAME
42 ioctl_console \- ioctls for console terminal and virtual consoles
43 .SH DESCRIPTION
44 The following Linux-specific
45 .BR ioctl (2)
46 requests are supported for console terminals and virtual consoles.
47 Each requires a third argument, assumed here to be
48 .IR argp .
49 .TP
50 .B KDGETLED
51 Get state of LEDs.
52 .I argp
53 points to a
54 .IR char .
55 The lower three bits
56 of
57 .I *argp
58 are set to the state of the LEDs, as follows:
59 .TS
60 l l l.
61 LED_CAP 0x04 caps lock led
62 LED_NUM 0x02 num lock led
63 LED_SCR 0x01 scroll lock led
64 .TE
65 .TP
66 .B KDSETLED
67 Set the LEDs.
68 The LEDs are set to correspond to the lower three bits of the
69 unsigned long integer in
70 .IR argp .
71 However, if a higher order bit is set,
72 the LEDs revert to normal: displaying the state of the
73 keyboard functions of caps lock, num lock, and scroll lock.
74 .PP
75 Before Linux 1.1.54, the LEDs just reflected the state of the corresponding
76 keyboard flags, and KDGETLED/KDSETLED would also change the keyboard
77 flags.
78 Since Linux 1.1.54 the LEDs can be made to display arbitrary
79 information, but by default they display the keyboard flags.
80 The following two ioctls are used to access the keyboard flags.
81 .TP
82 .B KDGKBLED
83 Get keyboard flags CapsLock, NumLock, ScrollLock (not lights).
84 .I argp
85 points to a char which is set to the flag state.
86 The low order three bits (mask 0x7) get the current flag state,
87 and the low order bits of the next nibble (mask 0x70) get
88 the default flag state.
89 (Since Linux 1.1.54.)
90 .TP
91 .B KDSKBLED
92 Set keyboard flags CapsLock, NumLock, ScrollLock (not lights).
93 .I argp
94 is an unsigned long integer that has the desired flag state.
95 The low order three bits (mask 0x7) have the flag state,
96 and the low order bits of the next nibble (mask 0x70) have
97 the default flag state.
98 (Since Linux 1.1.54.)
99 .TP
100 .B KDGKBTYPE
101 Get keyboard type.
102 This returns the value KB_101, defined as 0x02.
103 .TP
104 .B KDADDIO
105 Add I/O port as valid.
106 Equivalent to
107 .IR ioperm(arg,1,1) .
108 .TP
109 .B KDDELIO
110 Delete I/O port as valid.
111 Equivalent to
112 .IR ioperm(arg,1,0) .
113 .TP
114 .B KDENABIO
115 Enable I/O to video board.
116 Equivalent to
117 .IR "ioperm(0x3b4, 0x3df\-0x3b4+1, 1)" .
118 .TP
119 .B KDDISABIO
120 Disable I/O to video board.
121 Equivalent to
122 .IR "ioperm(0x3b4, 0x3df\-0x3b4+1, 0)" .
123 .TP
124 .B KDSETMODE
125 Set text/graphics mode.
126 .I argp
127 is an unsigned integer containing one of:
128 .TS
129 l l.
130 KD_TEXT 0x00
131 KD_GRAPHICS 0x01
132 .TE
133 .TP
134 .B KDGETMODE
135 Get text/graphics mode.
136 .I argp
137 points to an
138 .I int
139 which is set to one
140 of the values shown above for
141 .BR KDSETMODE .
142 .TP
143 .B KDMKTONE
144 Generate tone of specified length.
145 The lower 16 bits of the unsigned long integer in
146 .I argp
147 specify the period in clock cycles,
148 and the upper 16 bits give the duration in msec.
149 If the duration is zero, the sound is turned off.
150 Control returns immediately.
151 For example,
152 .I argp
153 = (125<<16) + 0x637 would specify
154 the beep normally associated with a ctrl-G.
155 (Thus since Linux 0.99pl1; broken in Linux 2.1.49-50.)
156 .TP
157 .B KIOCSOUND
158 Start or stop sound generation.
159 The lower 16 bits of
160 .I argp
161 specify the period in clock cycles
162 (that is,
163 .I argp
164 = 1193180/frequency).
165 .I argp
166 = 0 turns sound off.
167 In either case, control returns immediately.
168 .TP
169 .B GIO_CMAP
170 Get the current default color map from kernel.
171 .I argp
172 points to
173 a 48-byte array.
174 (Since Linux 1.3.3.)
175 .TP
176 .B PIO_CMAP
177 Change the default text-mode color map.
178 .I argp
179 points to a
180 48-byte array which contains, in order, the Red, Green, and Blue
181 values for the 16 available screen colors: 0 is off, and 255 is full
182 intensity.
183 The default colors are, in order: black, dark red, dark
184 green, brown, dark blue, dark purple, dark cyan, light grey, dark
185 grey, bright red, bright green, yellow, bright blue, bright purple,
186 bright cyan and white.
187 (Since Linux 1.3.3.)
188 .TP
189 .B GIO_FONT
190 Gets 256-character screen font in expanded form.
191 .I argp
192 points to an 8192-byte array.
193 Fails with error code
194 .B EINVAL
195 if the
196 currently loaded font is a 512-character font, or if the console is
197 not in text mode.
198 .TP
199 .B GIO_FONTX
200 Gets screen font and associated information.
201 .I argp
202 points to a
203 .I "struct consolefontdesc"
204 (see
205 .BR PIO_FONTX ).
206 On call, the
207 .I charcount
208 field should be set to the maximum number of
209 characters that would fit in the buffer pointed to by
210 .IR chardata .
211 On return, the
212 .I charcount
213 and
214 .I charheight
215 are filled with
216 the respective data for the currently loaded font, and the
217 .I chardata
218 array contains the font data if the initial value of
219 .I charcount
220 indicated enough space was available; otherwise the
221 buffer is untouched and
222 .I errno
223 is set to
224 .BR ENOMEM .
225 (Since Linux 1.3.1.)
226 .TP
227 .B PIO_FONT
228 Sets 256-character screen font.
229 Load font into the EGA/VGA character
230 generator.
231 .I argp
232 points to an 8192-byte map, with 32 bytes per
233 character.
234 Only the first
235 .I N
236 of them are used for an 8x\fIN\fP font
237 (0 <
238 .I N
239 <= 32).
240 This call also invalidates the Unicode mapping.
241 .TP
242 .B PIO_FONTX
243 Sets screen font and associated rendering information.
244 .I argp
245 points to a
246 .IP
247 .in +4n
248 .EX
249 struct consolefontdesc {
250 unsigned short charcount; /* characters in font
251 (256 or 512) */
252 unsigned short charheight; /* scan lines per
253 character (1\-32) */
254 char *chardata; /* font data in
255 expanded form */
256 };
257 .EE
258 .in
259 .IP
260 If necessary, the screen will be appropriately resized, and
261 .B SIGWINCH
262 sent to the appropriate processes.
263 This call also invalidates the Unicode mapping.
264 (Since Linux 1.3.1.)
265 .TP
266 .B PIO_FONTRESET
267 Resets the screen font, size and Unicode mapping to the bootup
268 defaults.
269 .I argp
270 is unused, but should be set to NULL to
271 ensure compatibility with future versions of Linux.
272 (Since Linux 1.3.28.)
273 .TP
274 .B GIO_SCRNMAP
275 Get screen mapping from kernel.
276 .I argp
277 points to an area of size
278 E_TABSZ, which is loaded with the font positions used to display each
279 character.
280 This call is likely to return useless information if the
281 currently loaded font is more than 256 characters.
282 .TP
283 .B GIO_UNISCRNMAP
284 Get full Unicode screen mapping from kernel.
285 .I argp
286 points to an
287 area of size
288 .IR "E_TABSZ*sizeof(unsigned short)" ,
289 which is loaded with the
290 Unicodes each character represent.
291 A special set of Unicodes,
292 starting at U+F000, are used to represent "direct to font" mappings.
293 (Since Linux 1.3.1.)
294 .TP
295 .B PIO_SCRNMAP
296 Loads the "user definable" (fourth) table in the kernel which maps
297 bytes into console screen symbols.
298 .I argp
299 points to an area of
300 size E_TABSZ.
301 .TP
302 .B PIO_UNISCRNMAP
303 Loads the "user definable" (fourth) table in the kernel which maps
304 bytes into Unicodes, which are then translated into screen symbols
305 according to the currently loaded Unicode-to-font map.
306 Special Unicodes starting at U+F000 can be used to map directly to the font
307 symbols.
308 (Since Linux 1.3.1.)
309 .TP
310 .B GIO_UNIMAP
311 Get Unicode-to-font mapping from kernel.
312 .I argp
313 points to a
314 .IP
315 .in +4n
316 .EX
317 struct unimapdesc {
318 unsigned short entry_ct;
319 struct unipair *entries;
320 };
321 .EE
322 .in
323 .IP
324 where
325 .I entries
326 points to an array of
327 .IP
328 .in +4n
329 .EX
330 struct unipair {
331 unsigned short unicode;
332 unsigned short fontpos;
333 };
334 .EE
335 .in
336 .IP
337 (Since Linux 1.1.92.)
338 .TP
339 .B PIO_UNIMAP
340 Put unicode-to-font mapping in kernel.
341 .I argp
342 points to a
343 .IR "struct unimapdesc" .
344 (Since Linux 1.1.92)
345 .TP
346 .B PIO_UNIMAPCLR
347 Clear table, possibly advise hash algorithm.
348 .I argp
349 points to a
350 .IP
351 .in +4n
352 .EX
353 struct unimapinit {
354 unsigned short advised_hashsize; /* 0 if no opinion */
355 unsigned short advised_hashstep; /* 0 if no opinion */
356 unsigned short advised_hashlevel; /* 0 if no opinion */
357 };
358 .EE
359 .in
360 .IP
361 (Since Linux 1.1.92.)
362 .TP
363 .B KDGKBMODE
364 Gets current keyboard mode.
365 .I argp
366 points to a
367 .I long
368 which is set to one
369 of these:
370 .TS
371 l l.
372 K_RAW 0x00 /* Raw (scancode) mode */
373 K_XLATE 0x01 /* Translate keycodes using keymap */
374 K_MEDIUMRAW 0x02 /* Medium raw (scancode) mode */
375 K_UNICODE 0x03 /* Unicode mode */
376 K_OFF 0x04 /* Disabled mode; since Linux 2.6.39 */
377 .\" K_OFF: commit 9fc3de9c83565fcaa23df74c2fc414bb6e7efb0a
378 .TE
379 .TP
380 .B KDSKBMODE
381 Sets current keyboard mode.
382 .I argp
383 is a
384 .I long
385 equal to one of the values shown for
386 .BR KDGKBMODE .
387 .TP
388 .B KDGKBMETA
389 Gets meta key handling mode.
390 .I argp
391 points to a
392 .I long
393 which is
394 set to one of these:
395 .TS
396 l l l.
397 K_METABIT 0x03 set high order bit
398 K_ESCPREFIX 0x04 escape prefix
399 .TE
400 .TP
401 .B KDSKBMETA
402 Sets meta key handling mode.
403 .I argp
404 is a
405 .I long
406 equal to one of the values shown above for
407 .BR KDGKBMETA .
408 .TP
409 .B KDGKBENT
410 Gets one entry in key translation table (keycode to action code).
411 .I argp
412 points to a
413 .IP
414 .in +4n
415 .EX
416 struct kbentry {
417 unsigned char kb_table;
418 unsigned char kb_index;
419 unsigned short kb_value;
420 };
421 .EE
422 .in
423 .IP
424 with the first two members filled in:
425 .I kb_table
426 selects the key table (0 <=
427 .I kb_table
428 < MAX_NR_KEYMAPS),
429 and
430 .IR kb_index
431 is the keycode (0 <=
432 .I kb_index
433 < NR_KEYS).
434 .I kb_value
435 is set to the corresponding action code,
436 or K_HOLE if there is no such key,
437 or K_NOSUCHMAP if
438 .I kb_table
439 is invalid.
440 .TP
441 .B KDSKBENT
442 Sets one entry in translation table.
443 .I argp
444 points to a
445 .IR "struct kbentry" .
446 .TP
447 .B KDGKBSENT
448 Gets one function key string.
449 .I argp
450 points to a
451 .IP
452 .in +4n
453 .EX
454 struct kbsentry {
455 unsigned char kb_func;
456 unsigned char kb_string[512];
457 };
458 .EE
459 .in
460 .IP
461 .I kb_string
462 is set to the (null-terminated) string corresponding to
463 the
464 .IR kb_func th
465 function key action code.
466 .TP
467 .B KDSKBSENT
468 Sets one function key string entry.
469 .I argp
470 points to a
471 .IR "struct kbsentry" .
472 .TP
473 .B KDGKBDIACR
474 Read kernel accent table.
475 .I argp
476 points to a
477 .IP
478 .in +4n
479 .EX
480 struct kbdiacrs {
481 unsigned int kb_cnt;
482 struct kbdiacr kbdiacr[256];
483 };
484 .EE
485 .in
486 .IP
487 where
488 .I kb_cnt
489 is the number of entries in the array, each of which
490 is a
491 .IP
492 .in +4n
493 .EX
494 struct kbdiacr {
495 unsigned char diacr;
496 unsigned char base;
497 unsigned char result;
498 };
499 .EE
500 .in
501 .TP
502 .B KDGETKEYCODE
503 Read kernel keycode table entry (scan code to keycode).
504 .I argp
505 points to a
506 .IP
507 .in +4n
508 .EX
509 struct kbkeycode {
510 unsigned int scancode;
511 unsigned int keycode;
512 };
513 .EE
514 .in
515 .IP
516 .I keycode
517 is set to correspond to the given
518 .IR scancode .
519 (89 <=
520 .I scancode
521 <= 255 only.
522 For 1 <=
523 .I scancode
524 <= 88,
525 .IR keycode == scancode .)
526 (Since Linux 1.1.63.)
527 .TP
528 .B KDSETKEYCODE
529 Write kernel keycode table entry.
530 .I argp
531 points to a
532 .IR "struct kbkeycode" .
533 (Since Linux 1.1.63.)
534 .TP
535 .B KDSIGACCEPT
536 The calling process indicates its willingness to accept the signal
537 .I argp
538 when it is generated by pressing an appropriate key combination.
539 (1 <=
540 .I argp
541 <= NSIG).
542 (See
543 .IR spawn_console ()
544 in
545 .IR linux/drivers/char/keyboard.c .)
546 .TP
547 .B VT_OPENQRY
548 Returns the first available (non-opened) console.
549 .I argp
550 points to an
551 .I int
552 which is set to the
553 number of the vt (1 <=
554 .I *argp
555 <= MAX_NR_CONSOLES).
556 .TP
557 .B VT_GETMODE
558 Get mode of active vt.
559 .I argp
560 points to a
561 .IP
562 .in +4n
563 .EX
564 struct vt_mode {
565 char mode; /* vt mode */
566 char waitv; /* if set, hang on writes if not active */
567 short relsig; /* signal to raise on release req */
568 short acqsig; /* signal to raise on acquisition */
569 short frsig; /* unused (set to 0) */
570 };
571 .EE
572 .in
573 .IP
574 which is set to the mode of the active vt.
575 .I mode
576 is set to one of these values:
577 .TS
578 l l.
579 VT_AUTO auto vt switching
580 VT_PROCESS process controls switching
581 VT_ACKACQ acknowledge switch
582 .TE
583 .TP
584 .B VT_SETMODE
585 Set mode of active vt.
586 .I argp
587 points to a
588 .IR "struct vt_mode" .
589 .TP
590 .B VT_GETSTATE
591 Get global vt state info.
592 .I argp
593 points to a
594 .IP
595 .in +4n
596 .EX
597 struct vt_stat {
598 unsigned short v_active; /* active vt */
599 unsigned short v_signal; /* signal to send */
600 unsigned short v_state; /* vt bit mask */
601 };
602 .EE
603 .in
604 .IP
605 For each vt in use, the corresponding bit in the
606 .I v_state
607 member is set.
608 (Kernels 1.0 through 1.1.92.)
609 .TP
610 .B VT_RELDISP
611 Release a display.
612 .TP
613 .B VT_ACTIVATE
614 Switch to vt
615 .IR argp
616 (1 <=
617 .I argp
618 <= MAX_NR_CONSOLES).
619 .TP
620 .B VT_WAITACTIVE
621 Wait until vt
622 .I argp
623 has been activated.
624 .TP
625 .B VT_DISALLOCATE
626 Deallocate the memory associated with vt
627 .IR argp .
628 (Since Linux 1.1.54.)
629 .TP
630 .B VT_RESIZE
631 Set the kernel's idea of screensize.
632 .I argp
633 points to a
634 .IP
635 .in +4n
636 .EX
637 struct vt_sizes {
638 unsigned short v_rows; /* # rows */
639 unsigned short v_cols; /* # columns */
640 unsigned short v_scrollsize; /* no longer used */
641 };
642 .EE
643 .in
644 .IP
645 Note that this does not change the videomode.
646 See
647 .BR resizecons (8).
648 (Since Linux 1.1.54.)
649 .TP
650 .B VT_RESIZEX
651 Set the kernel's idea of various screen parameters.
652 .I argp
653 points to a
654 .IP
655 .in +4n
656 .EX
657 struct vt_consize {
658 unsigned short v_rows; /* number of rows */
659 unsigned short v_cols; /* number of columns */
660 unsigned short v_vlin; /* number of pixel rows
661 on screen */
662 unsigned short v_clin; /* number of pixel rows
663 per character */
664 unsigned short v_vcol; /* number of pixel columns
665 on screen */
666 unsigned short v_ccol; /* number of pixel columns
667 per character */
668 };
669 .EE
670 .in
671 .IP
672 Any parameter may be set to zero, indicating "no change", but if
673 multiple parameters are set, they must be self-consistent.
674 Note that this does not change the videomode.
675 See
676 .BR resizecons (8).
677 (Since Linux 1.3.3.)
678 .PP
679 The action of the following ioctls depends on the first byte in the struct
680 pointed to by
681 .IR argp ,
682 referred to here as the
683 .IR subcode .
684 These are legal only for the superuser or the owner of the current terminal.
685 .TP
686 .B "TIOCLINUX, subcode=0"
687 Dump the screen.
688 Disappeared in Linux 1.1.92. (With kernel 1.1.92 or later, read from
689 .I /dev/vcsN
690 or
691 .I /dev/vcsaN
692 instead.)
693 .TP
694 .B "TIOCLINUX, subcode=1"
695 Get task information.
696 Disappeared in Linux 1.1.92.
697 .TP
698 .B "TIOCLINUX, subcode=2"
699 Set selection.
700 .I argp
701 points to a
702 .IP
703 .in +4n
704 .EX
705 struct {
706 char subcode;
707 short xs, ys, xe, ye;
708 short sel_mode;
709 };
710 .EE
711 .in
712 .IP
713 .I xs
714 and
715 .I ys
716 are the starting column and row.
717 .I xe
718 and
719 .I ye
720 are the ending
721 column and row.
722 (Upper left corner is row=column=1.)
723 .I sel_mode
724 is 0 for character-by-character selection,
725 1 for word-by-word selection,
726 or 2 for line-by-line selection.
727 The indicated screen characters are highlighted and saved
728 in the static array sel_buffer in
729 .IR devices/char/console.c .
730 .TP
731 .B "TIOCLINUX, subcode=3"
732 Paste selection.
733 The characters in the selection buffer are
734 written to
735 .IR fd .
736 .TP
737 .B "TIOCLINUX, subcode=4"
738 Unblank the screen.
739 .TP
740 .B "TIOCLINUX, subcode=5"
741 Sets contents of a 256-bit look up table defining characters in a "word",
742 for word-by-word selection.
743 (Since Linux 1.1.32.)
744 .TP
745 .B "TIOCLINUX, subcode=6"
746 .I argp
747 points to a char which is set to the value of the kernel
748 variable
749 .IR shift_state .
750 (Since Linux 1.1.32.)
751 .TP
752 .B "TIOCLINUX, subcode=7"
753 .I argp
754 points to a char which is set to the value of the kernel
755 variable
756 .IR report_mouse .
757 (Since Linux 1.1.33.)
758 .TP
759 .B "TIOCLINUX, subcode=8"
760 Dump screen width and height, cursor position, and all the
761 character-attribute pairs.
762 (Kernels 1.1.67 through 1.1.91 only.
763 With kernel 1.1.92 or later, read from
764 .I /dev/vcsa*
765 instead.)
766 .TP
767 .B "TIOCLINUX, subcode=9"
768 Restore screen width and height, cursor position, and all the
769 character-attribute pairs.
770 (Kernels 1.1.67 through 1.1.91 only.
771 With kernel 1.1.92 or later, write to
772 .I /dev/vcsa*
773 instead.)
774 .TP
775 .B "TIOCLINUX, subcode=10"
776 Handles the Power Saving
777 feature of the new generation of monitors.
778 VESA screen blanking mode is set to
779 .IR argp[1] ,
780 which governs what
781 screen blanking does:
782 .RS
783 .IP 0: 3
784 Screen blanking is disabled.
785 .IP 1:
786 The current video adapter
787 register settings are saved, then the controller is programmed to turn off
788 the vertical synchronization pulses.
789 This puts the monitor into "standby" mode.
790 If your monitor has an Off_Mode timer, then
791 it will eventually power down by itself.
792 .IP 2:
793 The current settings are saved, then both the vertical and horizontal
794 synchronization pulses are turned off.
795 This puts the monitor into "off" mode.
796 If your monitor has no Off_Mode timer,
797 or if you want your monitor to power down immediately when the
798 blank_timer times out, then you choose this option.
799 .RI ( Caution:
800 Powering down frequently will damage the monitor.)
801 (Since Linux 1.1.76.)
802 .RE
803 .SH RETURN VALUE
804 On success, 0 is returned.
805 On error, \-1 is returned, and
806 .I errno
807 is set.
808 .SH ERRORS
809 .I errno
810 may take on these values:
811 .TP
812 .B EBADF
813 The file descriptor is invalid.
814 .TP
815 .B EINVAL
816 The file descriptor or
817 .I argp
818 is invalid.
819 .TP
820 .B ENOTTY
821 The file descriptor is not associated with a character special device,
822 or the specified request does not apply to it.
823 .TP
824 .B EPERM
825 Insufficient permission.
826 .SH NOTES
827 .BR Warning :
828 Do not regard this man page as documentation of the Linux console ioctls.
829 This is provided for the curious only, as an alternative to reading the
830 source.
831 Ioctl's are undocumented Linux internals, liable to be changed
832 without warning.
833 (And indeed, this page more or less describes the
834 situation as of kernel version 1.1.94;
835 there are many minor and not-so-minor
836 differences with earlier versions.)
837 .PP
838 Very often, ioctls are introduced for communication between the
839 kernel and one particular well-known program (fdisk, hdparm, setserial,
840 tunelp, loadkeys, selection, setfont, etc.), and their behavior will be
841 changed when required by this particular program.
842 .PP
843 Programs using these ioctls will not be portable to other versions
844 of UNIX, will not work on older versions of Linux, and will not work
845 on future versions of Linux.
846 .PP
847 Use POSIX functions.
848 .SH SEE ALSO
849 .BR dumpkeys (1),
850 .BR kbd_mode (1),
851 .BR loadkeys (1),
852 .BR mknod (1),
853 .BR setleds (1),
854 .BR setmetamode (1),
855 .BR execve (2),
856 .BR fcntl (2),
857 .BR ioctl_tty (2),
858 .BR ioperm (2),
859 .BR termios (3),
860 .BR console_codes (4),
861 .BR mt (4),
862 .BR sd (4),
863 .BR tty (4),
864 .BR ttyS (4),
865 .BR vcs (4),
866 .BR vcsa (4),
867 .BR charsets (7),
868 .BR mapscrn (8),
869 .BR resizecons (8),
870 .BR setfont (8)
871 .PP
872 .IR /usr/include/linux/kd.h ,
873 .I /usr/include/linux/vt.h