]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
ioctl_console.2, ioctl_kd.2, man2const/: Split ioctl_kd(2) from ioctl_console(2)
authorAlejandro Colomar <alx@kernel.org>
Sun, 9 Jun 2024 22:57:35 +0000 (00:57 +0200)
committerAlejandro Colomar <alx@kernel.org>
Thu, 13 Jun 2024 21:54:44 +0000 (23:54 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
41 files changed:
man/man2/ioctl_console.2
man/man2/ioctl_kd.2 [new file with mode: 0644]
man/man2const/GIO_CMAP.2const [new file with mode: 0644]
man/man2const/GIO_FONT.2const [new file with mode: 0644]
man/man2const/GIO_FONTX.2const [new file with mode: 0644]
man/man2const/GIO_SCRNMAP.2const [new file with mode: 0644]
man/man2const/GIO_UNIMAP.2const [new file with mode: 0644]
man/man2const/GIO_UNISCRNMAP.2const [new file with mode: 0644]
man/man2const/KDADDIO.2const [new file with mode: 0644]
man/man2const/KDDELIO.2const [new file with mode: 0644]
man/man2const/KDDISABIO.2const [new file with mode: 0644]
man/man2const/KDENABIO.2const [new file with mode: 0644]
man/man2const/KDGETKEYCODE.2const [new file with mode: 0644]
man/man2const/KDGETLED.2const [new file with mode: 0644]
man/man2const/KDGETMODE.2const [new file with mode: 0644]
man/man2const/KDGKBDIACR.2const [new file with mode: 0644]
man/man2const/KDGKBENT.2const [new file with mode: 0644]
man/man2const/KDGKBLED.2const [new file with mode: 0644]
man/man2const/KDGKBMETA.2const [new file with mode: 0644]
man/man2const/KDGKBMODE.2const [new file with mode: 0644]
man/man2const/KDGKBSENT.2const [new file with mode: 0644]
man/man2const/KDGKBTYPE.2const [new file with mode: 0644]
man/man2const/KDMKTONE.2const [new file with mode: 0644]
man/man2const/KDSETKEYCODE.2const [new file with mode: 0644]
man/man2const/KDSETLED.2const [new file with mode: 0644]
man/man2const/KDSETMODE.2const [new file with mode: 0644]
man/man2const/KDSIGACCEPT.2const [new file with mode: 0644]
man/man2const/KDSKBENT.2const [new file with mode: 0644]
man/man2const/KDSKBLED.2const [new file with mode: 0644]
man/man2const/KDSKBMETA.2const [new file with mode: 0644]
man/man2const/KDSKBMODE.2const [new file with mode: 0644]
man/man2const/KDSKBSENT.2const [new file with mode: 0644]
man/man2const/KIOCSOUND.2const [new file with mode: 0644]
man/man2const/PIO_CMAP.2const [new file with mode: 0644]
man/man2const/PIO_FONT.2const [new file with mode: 0644]
man/man2const/PIO_FONTRESET.2const [new file with mode: 0644]
man/man2const/PIO_FONTX.2const [new file with mode: 0644]
man/man2const/PIO_SCRNMAP.2const [new file with mode: 0644]
man/man2const/PIO_UNIMAP.2const [new file with mode: 0644]
man/man2const/PIO_UNIMAPCLR.2const [new file with mode: 0644]
man/man2const/PIO_UNISCRNMAP.2const [new file with mode: 0644]

index d4f00893e47006d22f405dd771b0651e726d5ec1..0c18746c428e1575199ee51d56705fd8c492129b 100644 (file)
@@ -7,14 +7,6 @@
 .\" 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)
-.\" FIXME The following are not documented:
-.\"     KDFONTOP (since Linux 2.1.111)
-.\"     KDGKBDIACRUC (since Linux 2.6.24)
-.\"     KDSKBDIACR
-.\"     KDSKBDIACRUC (since Linux 2.6.24)
-.\"     KDKBDREP (since Linux 2.1.113)
-.\"     KDMAPDISP (not implemented as at Linux 2.6.27)
-.\"     KDUNMAPDISP (not implemented as at Linux 2.6.27)
 .\"
 .TH ioctl_console 2 (date) "Linux man-pages (unreleased)"
 .SH NAME
@@ -31,501 +23,84 @@ The following Linux-specific
 operations are supported for console terminals and virtual consoles.
 .TP
 .B KDGETLED
-Get state of LEDs.
-.I argp
-points to a
-.IR char .
-The lower three bits
-of
-.I *argp
-are set to the state of the LEDs, as follows:
-.TS
-l l l.
-LED_CAP        0x04    caps lock led
-LED_NUM        0x02    num lock led
-LED_SCR        0x01    scroll lock led
-.TE
-.TP
+.TQ
 .B KDSETLED
-Set the LEDs.
-The LEDs are set to correspond to the lower three bits of the
-unsigned long integer in
-.IR argp .
-However, if a higher order bit is set,
-the LEDs revert to normal: displaying the state of the
-keyboard functions of caps lock, num lock, and scroll lock.
-.P
-Before Linux 1.1.54, the LEDs just reflected the state of the corresponding
-keyboard flags, and KDGETLED/KDSETLED would also change the keyboard
-flags.
-Since Linux 1.1.54 the LEDs can be made to display arbitrary
-information, but by default they display the keyboard flags.
-The following two ioctls are used to access the keyboard flags.
-.TP
+.TQ
 .B KDGKBLED
-Get keyboard flags CapsLock, NumLock, ScrollLock (not lights).
-.I argp
-points to a char which is set to the flag state.
-The low order three bits (mask 0x7) get the current flag state,
-and the low order bits of the next nibble (mask 0x70) get
-the default flag state.
-(Since Linux 1.1.54.)
-.TP
+.TQ
 .B KDSKBLED
-Set keyboard flags CapsLock, NumLock, ScrollLock (not lights).
-.I argp
-is an unsigned long integer that has the desired flag state.
-The low order three bits (mask 0x7) have the flag state,
-and the low order bits of the next nibble (mask 0x70) have
-the default flag state.
-(Since Linux 1.1.54.)
-.TP
+.TQ
 .B KDGKBTYPE
-Get keyboard type.
-This returns the value KB_101, defined as 0x02.
-.TP
+.TQ
 .B KDADDIO
-Add I/O port as valid.
-Equivalent to
-.IR ioperm(arg,1,1) .
-.TP
+.TQ
 .B KDDELIO
-Delete I/O port as valid.
-Equivalent to
-.IR ioperm(arg,1,0) .
-.TP
+.TQ
 .B KDENABIO
-Enable I/O to video board.
-Equivalent to
-.IR "ioperm(0x3b4, 0x3df\-0x3b4+1, 1)" .
-.TP
+.TQ
 .B KDDISABIO
-Disable I/O to video board.
-Equivalent to
-.IR "ioperm(0x3b4, 0x3df\-0x3b4+1, 0)" .
-.TP
+.TQ
 .B KDSETMODE
-Set text/graphics mode.
-.I argp
-is an unsigned integer containing one of:
-.TS
-l l.
-KD_TEXT        0x00
-KD_GRAPHICS    0x01
-.TE
-.TP
+.TQ
 .B KDGETMODE
-Get text/graphics mode.
-.I argp
-points to an
-.I int
-which is set to one
-of the values shown above for
-.BR KDSETMODE .
-.TP
+.TQ
 .B KDMKTONE
-Generate tone of specified length.
-The lower 16 bits of the unsigned long integer in
-.I argp
-specify the period in clock cycles,
-and the upper 16 bits give the duration in msec.
-If the duration is zero, the sound is turned off.
-Control returns immediately.
-For example,
-.I argp
-= (125<<16) + 0x637 would specify
-the beep normally associated with a ctrl-G.
-(Thus since Linux 0.99pl1; broken in Linux 2.1.49-50.)
-.TP
+.TQ
 .B KIOCSOUND
-Start or stop sound generation.
-The lower 16 bits of
-.I argp
-specify the period in clock cycles
-(that is,
-.I argp
-= 1193180/frequency).
-.I argp
-= 0 turns sound off.
-In either case, control returns immediately.
-.TP
+.TQ
 .B GIO_CMAP
-Get the current default color map from kernel.
-.I argp
-points to
-a 48-byte array.
-(Since Linux 1.3.3.)
-.TP
+.TQ
 .B PIO_CMAP
-Change the default text-mode color map.
-.I argp
-points to a
-48-byte array which contains, in order, the Red, Green, and Blue
-values for the 16 available screen colors: 0 is off, and 255 is full
-intensity.
-The default colors are, in order: black, dark red, dark
-green, brown, dark blue, dark purple, dark cyan, light grey, dark
-grey, bright red, bright green, yellow, bright blue, bright purple,
-bright cyan, and white.
-(Since Linux 1.3.3.)
-.TP
+.TQ
 .B GIO_FONT
-Gets 256-character screen font in expanded form.
-.I argp
-points to an 8192-byte array.
-Fails with error code
-.B EINVAL
-if the
-currently loaded font is a 512-character font, or if the console is
-not in text mode.
-.TP
+.TQ
 .B GIO_FONTX
-Gets screen font and associated information.
-.I argp
-points to a
-.I "struct consolefontdesc"
-(see
-.BR PIO_FONTX ).
-On call, the
-.I charcount
-field should be set to the maximum number of
-characters that would fit in the buffer pointed to by
-.IR chardata .
-On return, the
-.I charcount
-and
-.I charheight
-are filled with
-the respective data for the currently loaded font, and the
-.I chardata
-array contains the font data if the initial value of
-.I charcount
-indicated enough space was available; otherwise the
-buffer is untouched and
-.I errno
-is set to
-.BR ENOMEM .
-(Since Linux 1.3.1.)
-.TP
+.TQ
 .B PIO_FONT
-Sets 256-character screen font.
-Load font into the EGA/VGA character
-generator.
-.I argp
-points to an 8192-byte map, with 32 bytes per
-character.
-Only the first
-.I N
-of them are used for an 8x\fIN\fP font
-(0 <
-.I N
-<= 32).
-This call also invalidates the Unicode mapping.
-.TP
+.TQ
 .B PIO_FONTX
-Sets screen font and associated rendering information.
-.I argp
-points to a
-.IP
-.in +4n
-.EX
-struct consolefontdesc {
-    unsigned short charcount;  /* characters in font
-                                  (256 or 512) */
-    unsigned short charheight; /* scan lines per
-                                  character (1\-32) */
-    char          *chardata;   /* font data in
-                                  expanded form */
-};
-.EE
-.in
-.IP
-If necessary, the screen will be appropriately resized, and
-.B SIGWINCH
-sent to the appropriate processes.
-This call also invalidates the Unicode mapping.
-(Since Linux 1.3.1.)
-.TP
+.TQ
 .B PIO_FONTRESET
-Resets the screen font, size, and Unicode mapping to the bootup
-defaults.
-.I argp
-is unused, but should be set to NULL to
-ensure compatibility with future versions of Linux.
-(Since Linux 1.3.28.)
-.TP
+.TQ
 .B GIO_SCRNMAP
-Get screen mapping from kernel.
-.I argp
-points to an area of size
-E_TABSZ, which is loaded with the font positions used to display each
-character.
-This call is likely to return useless information if the
-currently loaded font is more than 256 characters.
-.TP
+.TQ
 .B GIO_UNISCRNMAP
-Get full Unicode screen mapping from kernel.
-.I argp
-points to an
-area of size
-.IR "E_TABSZ*sizeof(unsigned short)" ,
-which is loaded with the
-Unicodes each character represent.
-A special set of Unicodes,
-starting at U+F000, are used to represent "direct to font" mappings.
-(Since Linux 1.3.1.)
-.TP
+.TQ
 .B PIO_SCRNMAP
-Loads the "user definable" (fourth) table in the kernel which maps
-bytes into console screen symbols.
-.I argp
-points to an area of
-size E_TABSZ.
-.TP
+.TQ
 .B PIO_UNISCRNMAP
-Loads the "user definable" (fourth) table in the kernel which maps
-bytes into Unicodes, which are then translated into screen symbols
-according to the currently loaded Unicode-to-font map.
-Special Unicodes starting at U+F000 can be used to map directly to the font
-symbols.
-(Since Linux 1.3.1.)
-.TP
+.TQ
 .B GIO_UNIMAP
-Get Unicode-to-font mapping from kernel.
-.I argp
-points to a
-.IP
-.in +4n
-.EX
-struct unimapdesc {
-    unsigned short  entry_ct;
-    struct unipair *entries;
-};
-.EE
-.in
-.IP
-where
-.I entries
-points to an array of
-.IP
-.in +4n
-.EX
-struct unipair {
-    unsigned short unicode;
-    unsigned short fontpos;
-};
-.EE
-.in
-.IP
-(Since Linux 1.1.92.)
-.TP
+.TQ
 .B PIO_UNIMAP
-Put unicode-to-font mapping in kernel.
-.I argp
-points to a
-.IR "struct unimapdesc" .
-(Since Linux 1.1.92)
-.TP
+.TQ
 .B PIO_UNIMAPCLR
-Clear table, possibly advise hash algorithm.
-.I argp
-points to a
-.IP
-.in +4n
-.EX
-struct unimapinit {
-    unsigned short advised_hashsize;  /* 0 if no opinion */
-    unsigned short advised_hashstep;  /* 0 if no opinion */
-    unsigned short advised_hashlevel; /* 0 if no opinion */
-};
-.EE
-.in
-.IP
-(Since Linux 1.1.92.)
-.TP
+.TQ
 .B KDGKBMODE
-Gets current keyboard mode.
-.I argp
-points to a
-.I long
-which is set to one
-of these:
-.TS
-l l.
-K_RAW  0x00  /* Raw (scancode) mode */
-K_XLATE        0x01  /* Translate keycodes using keymap */
-K_MEDIUMRAW    0x02  /* Medium raw (scancode) mode */
-K_UNICODE      0x03  /* Unicode mode */
-K_OFF  0x04  /* Disabled mode; since Linux 2.6.39 */
-.\" K_OFF: commit 9fc3de9c83565fcaa23df74c2fc414bb6e7efb0a
-.TE
-.TP
+.TQ
 .B KDSKBMODE
-Sets current keyboard mode.
-.I argp
-is a
-.I long
-equal to one of the values shown for
-.BR KDGKBMODE .
-.TP
+.TQ
 .B KDGKBMETA
-Gets meta key handling mode.
-.I argp
-points to a
-.I long
-which is
-set to one of these:
-.TS
-l l l.
-K_METABIT      0x03    set high order bit
-K_ESCPREFIX    0x04    escape prefix
-.TE
-.TP
+.TQ
 .B KDSKBMETA
-Sets meta key handling mode.
-.I argp
-is a
-.I long
-equal to one of the values shown above for
-.BR KDGKBMETA .
-.TP
+.TQ
 .B KDGKBENT
-Gets one entry in key translation table (keycode to action code).
-.I argp
-points to a
-.IP
-.in +4n
-.EX
-struct kbentry {
-    unsigned char  kb_table;
-    unsigned char  kb_index;
-    unsigned short kb_value;
-};
-.EE
-.in
-.IP
-with the first two members filled in:
-.I kb_table
-selects the key table (0 <=
-.I kb_table
-< MAX_NR_KEYMAPS),
-and
-.I kb_index
-is the keycode (0 <=
-.I kb_index
-< NR_KEYS).
-.I kb_value
-is set to the corresponding action code,
-or K_HOLE if there is no such key,
-or K_NOSUCHMAP if
-.I kb_table
-is invalid.
-.TP
+.TQ
 .B KDSKBENT
-Sets one entry in translation table.
-.I argp
-points to a
-.IR "struct kbentry" .
-.TP
+.TQ
 .B KDGKBSENT
-Gets one function key string.
-.I argp
-points to a
-.IP
-.in +4n
-.EX
-struct kbsentry {
-    unsigned char kb_func;
-    unsigned char kb_string[512];
-};
-.EE
-.in
-.IP
-.I kb_string
-is set to the (null-terminated) string corresponding to
-the
-.IR kb_func th
-function key action code.
-.TP
+.TQ
 .B KDSKBSENT
-Sets one function key string entry.
-.I argp
-points to a
-.IR "struct kbsentry" .
-.TP
+.TQ
 .B KDGKBDIACR
-Read kernel accent table.
-.I argp
-points to a
-.IP
-.in +4n
-.EX
-struct kbdiacrs {
-    unsigned int   kb_cnt;
-    struct kbdiacr kbdiacr[256];
-};
-.EE
-.in
-.IP
-where
-.I kb_cnt
-is the number of entries in the array, each of which
-is a
-.IP
-.in +4n
-.EX
-struct kbdiacr {
-    unsigned char diacr;
-    unsigned char base;
-    unsigned char result;
-};
-.EE
-.in
-.TP
+.TQ
 .B KDGETKEYCODE
-Read kernel keycode table entry (scan code to keycode).
-.I argp
-points to a
-.IP
-.in +4n
-.EX
-struct kbkeycode {
-    unsigned int scancode;
-    unsigned int keycode;
-};
-.EE
-.in
-.IP
-.I keycode
-is set to correspond to the given
-.IR scancode .
-(89 <=
-.I scancode
-<= 255 only.
-For 1 <=
-.I scancode
-<= 88,
-.IR keycode == scancode .)
-(Since Linux 1.1.63.)
-.TP
+.TQ
 .B KDSETKEYCODE
-Write kernel keycode table entry.
-.I argp
-points to a
-.IR "struct kbkeycode" .
-(Since Linux 1.1.63.)
-.TP
+.TQ
 .B KDSIGACCEPT
-The calling process indicates its willingness to accept the signal
-.I argp
-when it is generated by pressing an appropriate key combination.
-(1 <=
-.I argp
-<= NSIG).
-(See
-.IR spawn_console ()
-in
-.IR linux/drivers/char/keyboard.c .)
+See
+.BR ioctl_kd (2).
 .TP
 .B TIOCLINUX
 .TP
@@ -601,6 +176,7 @@ Use POSIX functions.
 .BR execve (2),
 .BR fcntl (2),
 .BR ioctl_tty (2),
+.BR ioctl_kd (2),
 .BR ioctl_vt (2),
 .BR ioperm (2),
 .BR termios (3),
@@ -615,5 +191,3 @@ Use POSIX functions.
 .BR mapscrn (8),
 .BR resizecons (8),
 .BR setfont (8)
-.P
-.I /usr/include/linux/kd.h
diff --git a/man/man2/ioctl_kd.2 b/man/man2/ioctl_kd.2
new file mode 100644 (file)
index 0000000..0a236c4
--- /dev/null
@@ -0,0 +1,547 @@
+'\" t
+.\" Copyright (c) 1995 Jim Van Zandt <jrv@vanzandt.mv.com> 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)
+.\" FIXME The following are not documented:
+.\"     KDFONTOP (since Linux 2.1.111)
+.\"     KDGKBDIACRUC (since Linux 2.6.24)
+.\"     KDSKBDIACR
+.\"     KDSKBDIACRUC (since Linux 2.6.24)
+.\"     KDKBDREP (since Linux 2.1.113)
+.\"     KDMAPDISP (not implemented as at Linux 2.6.27)
+.\"     KDUNMAPDISP (not implemented as at Linux 2.6.27)
+.\"
+.TH ioctl_kd 2 (date) "Linux man-pages (unreleased)"
+.SH NAME
+ioctl_kd
+\-
+ioctls for console terminal and virtual consoles
+.SH SYNOPSIS
+.nf
+.B #include <sys/ioctl.h>
+.P
+.BI "int ioctl(int " fd ", unsigned long " op ", void *" argp );
+.fi
+.SH DESCRIPTION
+The following Linux-specific
+.BR ioctl (2)
+operations are supported for console terminals and virtual consoles.
+.TP
+.B KDGETLED
+Get state of LEDs.
+.I argp
+points to a
+.IR char .
+The lower three bits
+of
+.I *argp
+are set to the state of the LEDs, as follows:
+.TS
+l l l.
+LED_CAP        0x04    caps lock led
+LED_NUM        0x02    num lock led
+LED_SCR        0x01    scroll lock led
+.TE
+.TP
+.B KDSETLED
+Set the LEDs.
+The LEDs are set to correspond to the lower three bits of the
+unsigned long integer in
+.IR argp .
+However, if a higher order bit is set,
+the LEDs revert to normal: displaying the state of the
+keyboard functions of caps lock, num lock, and scroll lock.
+.P
+Before Linux 1.1.54, the LEDs just reflected the state of the corresponding
+keyboard flags, and KDGETLED/KDSETLED would also change the keyboard
+flags.
+Since Linux 1.1.54 the LEDs can be made to display arbitrary
+information, but by default they display the keyboard flags.
+The following two ioctls are used to access the keyboard flags.
+.TP
+.B KDGKBLED
+Get keyboard flags CapsLock, NumLock, ScrollLock (not lights).
+.I argp
+points to a char which is set to the flag state.
+The low order three bits (mask 0x7) get the current flag state,
+and the low order bits of the next nibble (mask 0x70) get
+the default flag state.
+(Since Linux 1.1.54.)
+.TP
+.B KDSKBLED
+Set keyboard flags CapsLock, NumLock, ScrollLock (not lights).
+.I argp
+is an unsigned long integer that has the desired flag state.
+The low order three bits (mask 0x7) have the flag state,
+and the low order bits of the next nibble (mask 0x70) have
+the default flag state.
+(Since Linux 1.1.54.)
+.TP
+.B KDGKBTYPE
+Get keyboard type.
+This returns the value KB_101, defined as 0x02.
+.TP
+.B KDADDIO
+Add I/O port as valid.
+Equivalent to
+.IR ioperm(arg,1,1) .
+.TP
+.B KDDELIO
+Delete I/O port as valid.
+Equivalent to
+.IR ioperm(arg,1,0) .
+.TP
+.B KDENABIO
+Enable I/O to video board.
+Equivalent to
+.IR "ioperm(0x3b4, 0x3df\-0x3b4+1, 1)" .
+.TP
+.B KDDISABIO
+Disable I/O to video board.
+Equivalent to
+.IR "ioperm(0x3b4, 0x3df\-0x3b4+1, 0)" .
+.TP
+.B KDSETMODE
+Set text/graphics mode.
+.I argp
+is an unsigned integer containing one of:
+.TS
+l l.
+KD_TEXT        0x00
+KD_GRAPHICS    0x01
+.TE
+.TP
+.B KDGETMODE
+Get text/graphics mode.
+.I argp
+points to an
+.I int
+which is set to one
+of the values shown above for
+.BR KDSETMODE .
+.TP
+.B KDMKTONE
+Generate tone of specified length.
+The lower 16 bits of the unsigned long integer in
+.I argp
+specify the period in clock cycles,
+and the upper 16 bits give the duration in msec.
+If the duration is zero, the sound is turned off.
+Control returns immediately.
+For example,
+.I argp
+= (125<<16) + 0x637 would specify
+the beep normally associated with a ctrl-G.
+(Thus since Linux 0.99pl1; broken in Linux 2.1.49-50.)
+.TP
+.B KIOCSOUND
+Start or stop sound generation.
+The lower 16 bits of
+.I argp
+specify the period in clock cycles
+(that is,
+.I argp
+= 1193180/frequency).
+.I argp
+= 0 turns sound off.
+In either case, control returns immediately.
+.TP
+.B GIO_CMAP
+Get the current default color map from kernel.
+.I argp
+points to
+a 48-byte array.
+(Since Linux 1.3.3.)
+.TP
+.B PIO_CMAP
+Change the default text-mode color map.
+.I argp
+points to a
+48-byte array which contains, in order, the Red, Green, and Blue
+values for the 16 available screen colors: 0 is off, and 255 is full
+intensity.
+The default colors are, in order: black, dark red, dark
+green, brown, dark blue, dark purple, dark cyan, light grey, dark
+grey, bright red, bright green, yellow, bright blue, bright purple,
+bright cyan, and white.
+(Since Linux 1.3.3.)
+.TP
+.B GIO_FONT
+Gets 256-character screen font in expanded form.
+.I argp
+points to an 8192-byte array.
+Fails with error code
+.B EINVAL
+if the
+currently loaded font is a 512-character font, or if the console is
+not in text mode.
+.TP
+.B GIO_FONTX
+Gets screen font and associated information.
+.I argp
+points to a
+.I "struct consolefontdesc"
+(see
+.BR PIO_FONTX ).
+On call, the
+.I charcount
+field should be set to the maximum number of
+characters that would fit in the buffer pointed to by
+.IR chardata .
+On return, the
+.I charcount
+and
+.I charheight
+are filled with
+the respective data for the currently loaded font, and the
+.I chardata
+array contains the font data if the initial value of
+.I charcount
+indicated enough space was available; otherwise the
+buffer is untouched and
+.I errno
+is set to
+.BR ENOMEM .
+(Since Linux 1.3.1.)
+.TP
+.B PIO_FONT
+Sets 256-character screen font.
+Load font into the EGA/VGA character
+generator.
+.I argp
+points to an 8192-byte map, with 32 bytes per
+character.
+Only the first
+.I N
+of them are used for an 8x\fIN\fP font
+(0 <
+.I N
+<= 32).
+This call also invalidates the Unicode mapping.
+.TP
+.B PIO_FONTX
+Sets screen font and associated rendering information.
+.I argp
+points to a
+.IP
+.in +4n
+.EX
+struct consolefontdesc {
+    unsigned short charcount;  /* characters in font
+                                  (256 or 512) */
+    unsigned short charheight; /* scan lines per
+                                  character (1\-32) */
+    char          *chardata;   /* font data in
+                                  expanded form */
+};
+.EE
+.in
+.IP
+If necessary, the screen will be appropriately resized, and
+.B SIGWINCH
+sent to the appropriate processes.
+This call also invalidates the Unicode mapping.
+(Since Linux 1.3.1.)
+.TP
+.B PIO_FONTRESET
+Resets the screen font, size, and Unicode mapping to the bootup
+defaults.
+.I argp
+is unused, but should be set to NULL to
+ensure compatibility with future versions of Linux.
+(Since Linux 1.3.28.)
+.TP
+.B GIO_SCRNMAP
+Get screen mapping from kernel.
+.I argp
+points to an area of size
+E_TABSZ, which is loaded with the font positions used to display each
+character.
+This call is likely to return useless information if the
+currently loaded font is more than 256 characters.
+.TP
+.B GIO_UNISCRNMAP
+Get full Unicode screen mapping from kernel.
+.I argp
+points to an
+area of size
+.IR "E_TABSZ*sizeof(unsigned short)" ,
+which is loaded with the
+Unicodes each character represent.
+A special set of Unicodes,
+starting at U+F000, are used to represent "direct to font" mappings.
+(Since Linux 1.3.1.)
+.TP
+.B PIO_SCRNMAP
+Loads the "user definable" (fourth) table in the kernel which maps
+bytes into console screen symbols.
+.I argp
+points to an area of
+size E_TABSZ.
+.TP
+.B PIO_UNISCRNMAP
+Loads the "user definable" (fourth) table in the kernel which maps
+bytes into Unicodes, which are then translated into screen symbols
+according to the currently loaded Unicode-to-font map.
+Special Unicodes starting at U+F000 can be used to map directly to the font
+symbols.
+(Since Linux 1.3.1.)
+.TP
+.B GIO_UNIMAP
+Get Unicode-to-font mapping from kernel.
+.I argp
+points to a
+.IP
+.in +4n
+.EX
+struct unimapdesc {
+    unsigned short  entry_ct;
+    struct unipair *entries;
+};
+.EE
+.in
+.IP
+where
+.I entries
+points to an array of
+.IP
+.in +4n
+.EX
+struct unipair {
+    unsigned short unicode;
+    unsigned short fontpos;
+};
+.EE
+.in
+.IP
+(Since Linux 1.1.92.)
+.TP
+.B PIO_UNIMAP
+Put unicode-to-font mapping in kernel.
+.I argp
+points to a
+.IR "struct unimapdesc" .
+(Since Linux 1.1.92)
+.TP
+.B PIO_UNIMAPCLR
+Clear table, possibly advise hash algorithm.
+.I argp
+points to a
+.IP
+.in +4n
+.EX
+struct unimapinit {
+    unsigned short advised_hashsize;  /* 0 if no opinion */
+    unsigned short advised_hashstep;  /* 0 if no opinion */
+    unsigned short advised_hashlevel; /* 0 if no opinion */
+};
+.EE
+.in
+.IP
+(Since Linux 1.1.92.)
+.TP
+.B KDGKBMODE
+Gets current keyboard mode.
+.I argp
+points to a
+.I long
+which is set to one
+of these:
+.TS
+l l.
+K_RAW  0x00  /* Raw (scancode) mode */
+K_XLATE        0x01  /* Translate keycodes using keymap */
+K_MEDIUMRAW    0x02  /* Medium raw (scancode) mode */
+K_UNICODE      0x03  /* Unicode mode */
+K_OFF  0x04  /* Disabled mode; since Linux 2.6.39 */
+.\" K_OFF: commit 9fc3de9c83565fcaa23df74c2fc414bb6e7efb0a
+.TE
+.TP
+.B KDSKBMODE
+Sets current keyboard mode.
+.I argp
+is a
+.I long
+equal to one of the values shown for
+.BR KDGKBMODE .
+.TP
+.B KDGKBMETA
+Gets meta key handling mode.
+.I argp
+points to a
+.I long
+which is
+set to one of these:
+.TS
+l l l.
+K_METABIT      0x03    set high order bit
+K_ESCPREFIX    0x04    escape prefix
+.TE
+.TP
+.B KDSKBMETA
+Sets meta key handling mode.
+.I argp
+is a
+.I long
+equal to one of the values shown above for
+.BR KDGKBMETA .
+.TP
+.B KDGKBENT
+Gets one entry in key translation table (keycode to action code).
+.I argp
+points to a
+.IP
+.in +4n
+.EX
+struct kbentry {
+    unsigned char  kb_table;
+    unsigned char  kb_index;
+    unsigned short kb_value;
+};
+.EE
+.in
+.IP
+with the first two members filled in:
+.I kb_table
+selects the key table (0 <=
+.I kb_table
+< MAX_NR_KEYMAPS),
+and
+.I kb_index
+is the keycode (0 <=
+.I kb_index
+< NR_KEYS).
+.I kb_value
+is set to the corresponding action code,
+or K_HOLE if there is no such key,
+or K_NOSUCHMAP if
+.I kb_table
+is invalid.
+.TP
+.B KDSKBENT
+Sets one entry in translation table.
+.I argp
+points to a
+.IR "struct kbentry" .
+.TP
+.B KDGKBSENT
+Gets one function key string.
+.I argp
+points to a
+.IP
+.in +4n
+.EX
+struct kbsentry {
+    unsigned char kb_func;
+    unsigned char kb_string[512];
+};
+.EE
+.in
+.IP
+.I kb_string
+is set to the (null-terminated) string corresponding to
+the
+.IR kb_func th
+function key action code.
+.TP
+.B KDSKBSENT
+Sets one function key string entry.
+.I argp
+points to a
+.IR "struct kbsentry" .
+.TP
+.B KDGKBDIACR
+Read kernel accent table.
+.I argp
+points to a
+.IP
+.in +4n
+.EX
+struct kbdiacrs {
+    unsigned int   kb_cnt;
+    struct kbdiacr kbdiacr[256];
+};
+.EE
+.in
+.IP
+where
+.I kb_cnt
+is the number of entries in the array, each of which
+is a
+.IP
+.in +4n
+.EX
+struct kbdiacr {
+    unsigned char diacr;
+    unsigned char base;
+    unsigned char result;
+};
+.EE
+.in
+.TP
+.B KDGETKEYCODE
+Read kernel keycode table entry (scan code to keycode).
+.I argp
+points to a
+.IP
+.in +4n
+.EX
+struct kbkeycode {
+    unsigned int scancode;
+    unsigned int keycode;
+};
+.EE
+.in
+.IP
+.I keycode
+is set to correspond to the given
+.IR scancode .
+(89 <=
+.I scancode
+<= 255 only.
+For 1 <=
+.I scancode
+<= 88,
+.IR keycode == scancode .)
+(Since Linux 1.1.63.)
+.TP
+.B KDSETKEYCODE
+Write kernel keycode table entry.
+.I argp
+points to a
+.IR "struct kbkeycode" .
+(Since Linux 1.1.63.)
+.TP
+.B KDSIGACCEPT
+The calling process indicates its willingness to accept the signal
+.I argp
+when it is generated by pressing an appropriate key combination.
+(1 <=
+.I argp
+<= NSIG).
+(See
+.IR spawn_console ()
+in
+.IR linux/drivers/char/keyboard.c .)
+.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.
+.SH STANDARDS
+Linux.
+.SH SEE ALSO
+.BR ioctl (2),
+.BR ioctl_console (2)
+.P
+.I /usr/include/linux/kd.h
diff --git a/man/man2const/GIO_CMAP.2const b/man/man2const/GIO_CMAP.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/GIO_FONT.2const b/man/man2const/GIO_FONT.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/GIO_FONTX.2const b/man/man2const/GIO_FONTX.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/GIO_SCRNMAP.2const b/man/man2const/GIO_SCRNMAP.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/GIO_UNIMAP.2const b/man/man2const/GIO_UNIMAP.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/GIO_UNISCRNMAP.2const b/man/man2const/GIO_UNISCRNMAP.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDADDIO.2const b/man/man2const/KDADDIO.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDDELIO.2const b/man/man2const/KDDELIO.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDDISABIO.2const b/man/man2const/KDDISABIO.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDENABIO.2const b/man/man2const/KDENABIO.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDGETKEYCODE.2const b/man/man2const/KDGETKEYCODE.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDGETLED.2const b/man/man2const/KDGETLED.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDGETMODE.2const b/man/man2const/KDGETMODE.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDGKBDIACR.2const b/man/man2const/KDGKBDIACR.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDGKBENT.2const b/man/man2const/KDGKBENT.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDGKBLED.2const b/man/man2const/KDGKBLED.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDGKBMETA.2const b/man/man2const/KDGKBMETA.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDGKBMODE.2const b/man/man2const/KDGKBMODE.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDGKBSENT.2const b/man/man2const/KDGKBSENT.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDGKBTYPE.2const b/man/man2const/KDGKBTYPE.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDMKTONE.2const b/man/man2const/KDMKTONE.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDSETKEYCODE.2const b/man/man2const/KDSETKEYCODE.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDSETLED.2const b/man/man2const/KDSETLED.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDSETMODE.2const b/man/man2const/KDSETMODE.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDSIGACCEPT.2const b/man/man2const/KDSIGACCEPT.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDSKBENT.2const b/man/man2const/KDSKBENT.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDSKBLED.2const b/man/man2const/KDSKBLED.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDSKBMETA.2const b/man/man2const/KDSKBMETA.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDSKBMODE.2const b/man/man2const/KDSKBMODE.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KDSKBSENT.2const b/man/man2const/KDSKBSENT.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/KIOCSOUND.2const b/man/man2const/KIOCSOUND.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/PIO_CMAP.2const b/man/man2const/PIO_CMAP.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/PIO_FONT.2const b/man/man2const/PIO_FONT.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/PIO_FONTRESET.2const b/man/man2const/PIO_FONTRESET.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/PIO_FONTX.2const b/man/man2const/PIO_FONTX.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/PIO_SCRNMAP.2const b/man/man2const/PIO_SCRNMAP.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/PIO_UNIMAP.2const b/man/man2const/PIO_UNIMAP.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/PIO_UNIMAPCLR.2const b/man/man2const/PIO_UNIMAPCLR.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2
diff --git a/man/man2const/PIO_UNISCRNMAP.2const b/man/man2const/PIO_UNISCRNMAP.2const
new file mode 100644 (file)
index 0000000..6e58ecb
--- /dev/null
@@ -0,0 +1 @@
+.so man2/ioctl_kd.2