1120 lines
26 KiB
HTML
1120 lines
26 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of IOCTL_CONSOLE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>IOCTL_CONSOLE</H1>
|
|
Section: Linux Programmer's Manual (2)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
ioctl_console - ioctls for console terminal and virtual consoles
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The following Linux-specific
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ioctl">ioctl</A></B>(2)
|
|
|
|
requests are supported for console terminals and virtual consoles.
|
|
Each requires a third argument, assumed here to be
|
|
<I>argp</I>.
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>KDGETLED</B>
|
|
|
|
<DD>
|
|
Get state of LEDs.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<I>char</I>.
|
|
|
|
The lower three bits
|
|
of
|
|
<I>*argp</I>
|
|
|
|
are set to the state of the LEDs, as follows:
|
|
<TABLE>
|
|
<TR VALIGN=top><TD>LED_CAP </TD><TD>0x04</TD><TD>caps lock led<BR></TD></TR>
|
|
<TR VALIGN=top><TD>LED_NUM </TD><TD>0x02</TD><TD>num lock led<BR></TD></TR>
|
|
<TR VALIGN=top><TD>LED_SCR </TD><TD>0x01</TD><TD>scroll lock led<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<DT id="2"><B>KDSETLED</B>
|
|
|
|
<DD>
|
|
Set the LEDs.
|
|
The LEDs are set to correspond to the lower three bits of the
|
|
unsigned long integer in
|
|
<I>argp</I>.
|
|
|
|
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.
|
|
</DL>
|
|
<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.
|
|
<DL COMPACT>
|
|
<DT id="3"><B>KDGKBLED</B>
|
|
|
|
<DD>
|
|
Get keyboard flags CapsLock, NumLock, ScrollLock (not lights).
|
|
<I>argp</I>
|
|
|
|
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.)
|
|
<DT id="4"><B>KDSKBLED</B>
|
|
|
|
<DD>
|
|
Set keyboard flags CapsLock, NumLock, ScrollLock (not lights).
|
|
<I>argp</I>
|
|
|
|
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.)
|
|
<DT id="5"><B>KDGKBTYPE</B>
|
|
|
|
<DD>
|
|
Get keyboard type.
|
|
This returns the value KB_101, defined as 0x02.
|
|
<DT id="6"><B>KDADDIO</B>
|
|
|
|
<DD>
|
|
Add I/O port as valid.
|
|
Equivalent to
|
|
<I>ioperm(arg,1,1)</I>.
|
|
|
|
<DT id="7"><B>KDDELIO</B>
|
|
|
|
<DD>
|
|
Delete I/O port as valid.
|
|
Equivalent to
|
|
<I>ioperm(arg,1,0)</I>.
|
|
|
|
<DT id="8"><B>KDENABIO</B>
|
|
|
|
<DD>
|
|
Enable I/O to video board.
|
|
Equivalent to
|
|
<I>ioperm(0x3b4, 0x3df-0x3b4+1, 1)</I>.
|
|
|
|
<DT id="9"><B>KDDISABIO</B>
|
|
|
|
<DD>
|
|
Disable I/O to video board.
|
|
Equivalent to
|
|
<I>ioperm(0x3b4, 0x3df-0x3b4+1, 0)</I>.
|
|
|
|
<DT id="10"><B>KDSETMODE</B>
|
|
|
|
<DD>
|
|
Set text/graphics mode.
|
|
<I>argp</I>
|
|
|
|
is an unsigned integer containing one of:
|
|
<TABLE>
|
|
<TR VALIGN=top><TD>KD_TEXT</TD><TD>0x00<BR></TD></TR>
|
|
<TR VALIGN=top><TD>KD_GRAPHICS</TD><TD>0x01<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<DT id="11"><B>KDGETMODE</B>
|
|
|
|
<DD>
|
|
Get text/graphics mode.
|
|
<I>argp</I>
|
|
|
|
points to an
|
|
<I>int</I>
|
|
|
|
which is set to one
|
|
of the values shown above for
|
|
<B>KDSETMODE</B>.
|
|
|
|
<DT id="12"><B>KDMKTONE</B>
|
|
|
|
<DD>
|
|
Generate tone of specified length.
|
|
The lower 16 bits of the unsigned long integer in
|
|
<I>argp</I>
|
|
|
|
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</I>
|
|
|
|
= (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.)
|
|
<DT id="13"><B>KIOCSOUND</B>
|
|
|
|
<DD>
|
|
Start or stop sound generation.
|
|
The lower 16 bits of
|
|
<I>argp</I>
|
|
|
|
specify the period in clock cycles
|
|
(that is,
|
|
<I>argp</I>
|
|
|
|
= 1193180/frequency).
|
|
<I>argp</I>
|
|
|
|
= 0 turns sound off.
|
|
In either case, control returns immediately.
|
|
<DT id="14"><B>GIO_CMAP</B>
|
|
|
|
<DD>
|
|
Get the current default color map from kernel.
|
|
<I>argp</I>
|
|
|
|
points to
|
|
a 48-byte array.
|
|
(Since Linux 1.3.3.)
|
|
<DT id="15"><B>PIO_CMAP</B>
|
|
|
|
<DD>
|
|
Change the default text-mode color map.
|
|
<I>argp</I>
|
|
|
|
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.)
|
|
<DT id="16"><B>GIO_FONT</B>
|
|
|
|
<DD>
|
|
Gets 256-character screen font in expanded form.
|
|
<I>argp</I>
|
|
|
|
points to an 8192-byte array.
|
|
Fails with error code
|
|
<B>EINVAL</B>
|
|
|
|
if the
|
|
currently loaded font is a 512-character font, or if the console is
|
|
not in text mode.
|
|
<DT id="17"><B>GIO_FONTX</B>
|
|
|
|
<DD>
|
|
Gets screen font and associated information.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<I>struct consolefontdesc</I>
|
|
|
|
(see
|
|
<B>PIO_FONTX</B>).
|
|
|
|
On call, the
|
|
<I>charcount</I>
|
|
|
|
field should be set to the maximum number of
|
|
characters that would fit in the buffer pointed to by
|
|
<I>chardata</I>.
|
|
|
|
On return, the
|
|
<I>charcount</I>
|
|
|
|
and
|
|
<I>charheight</I>
|
|
|
|
are filled with
|
|
the respective data for the currently loaded font, and the
|
|
<I>chardata</I>
|
|
|
|
array contains the font data if the initial value of
|
|
<I>charcount</I>
|
|
|
|
indicated enough space was available; otherwise the
|
|
buffer is untouched and
|
|
<I>errno</I>
|
|
|
|
is set to
|
|
<B>ENOMEM</B>.
|
|
|
|
(Since Linux 1.3.1.)
|
|
<DT id="18"><B>PIO_FONT</B>
|
|
|
|
<DD>
|
|
Sets 256-character screen font.
|
|
Load font into the EGA/VGA character
|
|
generator.
|
|
<I>argp</I>
|
|
|
|
points to an 8192-byte map, with 32 bytes per
|
|
character.
|
|
Only the first
|
|
<I>N</I>
|
|
|
|
of them are used for an 8x<I>N</I> font
|
|
(0 <
|
|
<I>N</I>
|
|
|
|
<= 32).
|
|
This call also invalidates the Unicode mapping.
|
|
<DT id="19"><B>PIO_FONTX</B>
|
|
|
|
<DD>
|
|
Sets screen font and associated rendering information.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="20"><DD>
|
|
|
|
|
|
struct consolefontdesc {
|
|
<BR> unsigned short charcount; /* characters in font
|
|
<BR> (256 or 512) */
|
|
<BR> unsigned short charheight; /* scan lines per
|
|
<BR> character (1-32) */
|
|
<BR> char *chardata; /* font data in
|
|
<BR> expanded form */
|
|
};
|
|
|
|
|
|
<DT id="21"><DD>
|
|
If necessary, the screen will be appropriately resized, and
|
|
<B>SIGWINCH</B>
|
|
|
|
sent to the appropriate processes.
|
|
This call also invalidates the Unicode mapping.
|
|
(Since Linux 1.3.1.)
|
|
<DT id="22"><B>PIO_FONTRESET</B>
|
|
|
|
<DD>
|
|
Resets the screen font, size and Unicode mapping to the bootup
|
|
defaults.
|
|
<I>argp</I>
|
|
|
|
is unused, but should be set to NULL to
|
|
ensure compatibility with future versions of Linux.
|
|
(Since Linux 1.3.28.)
|
|
<DT id="23"><B>GIO_SCRNMAP</B>
|
|
|
|
<DD>
|
|
Get screen mapping from kernel.
|
|
<I>argp</I>
|
|
|
|
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.
|
|
<DT id="24"><B>GIO_UNISCRNMAP</B>
|
|
|
|
<DD>
|
|
Get full Unicode screen mapping from kernel.
|
|
<I>argp</I>
|
|
|
|
points to an
|
|
area of size
|
|
<I>E_TABSZ*sizeof(unsigned short)</I>,
|
|
|
|
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.)
|
|
<DT id="25"><B>PIO_SCRNMAP</B>
|
|
|
|
<DD>
|
|
Loads the "user definable" (fourth) table in the kernel which maps
|
|
bytes into console screen symbols.
|
|
<I>argp</I>
|
|
|
|
points to an area of
|
|
size E_TABSZ.
|
|
<DT id="26"><B>PIO_UNISCRNMAP</B>
|
|
|
|
<DD>
|
|
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.)
|
|
<DT id="27"><B>GIO_UNIMAP</B>
|
|
|
|
<DD>
|
|
Get Unicode-to-font mapping from kernel.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="28"><DD>
|
|
|
|
|
|
struct unimapdesc {
|
|
<BR> unsigned short entry_ct;
|
|
<BR> struct unipair *entries;
|
|
};
|
|
|
|
|
|
<DT id="29"><DD>
|
|
where
|
|
<I>entries</I>
|
|
|
|
points to an array of
|
|
<DT id="30"><DD>
|
|
|
|
|
|
struct unipair {
|
|
<BR> unsigned short unicode;
|
|
<BR> unsigned short fontpos;
|
|
};
|
|
|
|
|
|
<DT id="31"><DD>
|
|
(Since Linux 1.1.92.)
|
|
<DT id="32"><B>PIO_UNIMAP</B>
|
|
|
|
<DD>
|
|
Put unicode-to-font mapping in kernel.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<I>struct unimapdesc</I>.
|
|
|
|
(Since Linux 1.1.92)
|
|
<DT id="33"><B>PIO_UNIMAPCLR</B>
|
|
|
|
<DD>
|
|
Clear table, possibly advise hash algorithm.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="34"><DD>
|
|
|
|
|
|
struct unimapinit {
|
|
<BR> unsigned short advised_hashsize; /* 0 if no opinion */
|
|
<BR> unsigned short advised_hashstep; /* 0 if no opinion */
|
|
<BR> unsigned short advised_hashlevel; /* 0 if no opinion */
|
|
};
|
|
|
|
|
|
<DT id="35"><DD>
|
|
(Since Linux 1.1.92.)
|
|
<DT id="36"><B>KDGKBMODE</B>
|
|
|
|
<DD>
|
|
Gets current keyboard mode.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<I>long</I>
|
|
|
|
which is set to one
|
|
of these:
|
|
<TABLE>
|
|
<TR VALIGN=top><TD>K_RAW</TD><TD>0x00 /* Raw (scancode) mode */<BR></TD></TR>
|
|
<TR VALIGN=top><TD>K_XLATE</TD><TD>0x01 /* Translate keycodes using keymap */<BR></TD></TR>
|
|
<TR VALIGN=top><TD>K_MEDIUMRAW</TD><TD>0x02 /* Medium raw (scancode) mode */<BR></TD></TR>
|
|
<TR VALIGN=top><TD>K_UNICODE</TD><TD>0x03 /* Unicode mode */<BR></TD></TR>
|
|
<TR VALIGN=top><TD>K_OFF</TD><TD>0x04 /* Disabled mode; since Linux 2.6.39 */<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<DT id="37"><B>KDSKBMODE</B>
|
|
|
|
<DD>
|
|
Sets current keyboard mode.
|
|
<I>argp</I>
|
|
|
|
is a
|
|
<I>long</I>
|
|
|
|
equal to one of the values shown for
|
|
<B>KDGKBMODE</B>.
|
|
|
|
<DT id="38"><B>KDGKBMETA</B>
|
|
|
|
<DD>
|
|
Gets meta key handling mode.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<I>long</I>
|
|
|
|
which is
|
|
set to one of these:
|
|
<TABLE>
|
|
<TR VALIGN=top><TD>K_METABIT</TD><TD>0x03</TD><TD>set high order bit<BR></TD></TR>
|
|
<TR VALIGN=top><TD>K_ESCPREFIX</TD><TD>0x04</TD><TD>escape prefix<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<DT id="39"><B>KDSKBMETA</B>
|
|
|
|
<DD>
|
|
Sets meta key handling mode.
|
|
<I>argp</I>
|
|
|
|
is a
|
|
<I>long</I>
|
|
|
|
equal to one of the values shown above for
|
|
<B>KDGKBMETA</B>.
|
|
|
|
<DT id="40"><B>KDGKBENT</B>
|
|
|
|
<DD>
|
|
Gets one entry in key translation table (keycode to action code).
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="41"><DD>
|
|
|
|
|
|
struct kbentry {
|
|
<BR> unsigned char kb_table;
|
|
<BR> unsigned char kb_index;
|
|
<BR> unsigned short kb_value;
|
|
};
|
|
|
|
|
|
<DT id="42"><DD>
|
|
with the first two members filled in:
|
|
<I>kb_table</I>
|
|
|
|
selects the key table (0 <=
|
|
<I>kb_table</I>
|
|
|
|
< MAX_NR_KEYMAPS),
|
|
and
|
|
<I>kb_index</I>
|
|
|
|
is the keycode (0 <=
|
|
<I>kb_index</I>
|
|
|
|
< NR_KEYS).
|
|
<I>kb_value</I>
|
|
|
|
is set to the corresponding action code,
|
|
or K_HOLE if there is no such key,
|
|
or K_NOSUCHMAP if
|
|
<I>kb_table</I>
|
|
|
|
is invalid.
|
|
<DT id="43"><B>KDSKBENT</B>
|
|
|
|
<DD>
|
|
Sets one entry in translation table.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<I>struct kbentry</I>.
|
|
|
|
<DT id="44"><B>KDGKBSENT</B>
|
|
|
|
<DD>
|
|
Gets one function key string.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="45"><DD>
|
|
|
|
|
|
struct kbsentry {
|
|
<BR> unsigned char kb_func;
|
|
<BR> unsigned char kb_string[512];
|
|
};
|
|
|
|
|
|
<DT id="46"><DD>
|
|
<I>kb_string</I>
|
|
|
|
is set to the (null-terminated) string corresponding to
|
|
the
|
|
<I>kb_func</I>th
|
|
|
|
function key action code.
|
|
<DT id="47"><B>KDSKBSENT</B>
|
|
|
|
<DD>
|
|
Sets one function key string entry.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<I>struct kbsentry</I>.
|
|
|
|
<DT id="48"><B>KDGKBDIACR</B>
|
|
|
|
<DD>
|
|
Read kernel accent table.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="49"><DD>
|
|
|
|
|
|
struct kbdiacrs {
|
|
<BR> unsigned int kb_cnt;
|
|
<BR> struct kbdiacr kbdiacr[256];
|
|
};
|
|
|
|
|
|
<DT id="50"><DD>
|
|
where
|
|
<I>kb_cnt</I>
|
|
|
|
is the number of entries in the array, each of which
|
|
is a
|
|
<DT id="51"><DD>
|
|
|
|
|
|
struct kbdiacr {
|
|
<BR> unsigned char diacr;
|
|
<BR> unsigned char base;
|
|
<BR> unsigned char result;
|
|
};
|
|
|
|
|
|
<DT id="52"><B>KDGETKEYCODE</B>
|
|
|
|
<DD>
|
|
Read kernel keycode table entry (scan code to keycode).
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="53"><DD>
|
|
|
|
|
|
struct kbkeycode {
|
|
<BR> unsigned int scancode;
|
|
<BR> unsigned int keycode;
|
|
};
|
|
|
|
|
|
<DT id="54"><DD>
|
|
<I>keycode</I>
|
|
|
|
is set to correspond to the given
|
|
<I>scancode</I>.
|
|
|
|
(89 <=
|
|
<I>scancode</I>
|
|
|
|
<= 255 only.
|
|
For 1 <=
|
|
<I>scancode</I>
|
|
|
|
<= 88,
|
|
<I>keycode</I>==<I>scancode</I>.)
|
|
|
|
(Since Linux 1.1.63.)
|
|
<DT id="55"><B>KDSETKEYCODE</B>
|
|
|
|
<DD>
|
|
Write kernel keycode table entry.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<I>struct kbkeycode</I>.
|
|
|
|
(Since Linux 1.1.63.)
|
|
<DT id="56"><B>KDSIGACCEPT</B>
|
|
|
|
<DD>
|
|
The calling process indicates its willingness to accept the signal
|
|
<I>argp</I>
|
|
|
|
when it is generated by pressing an appropriate key combination.
|
|
(1 <=
|
|
<I>argp</I>
|
|
|
|
<= NSIG).
|
|
(See
|
|
<I>spawn_console</I>()
|
|
|
|
in
|
|
<I>linux/drivers/char/keyboard.c</I>.)
|
|
|
|
<DT id="57"><B>VT_OPENQRY</B>
|
|
|
|
<DD>
|
|
Returns the first available (non-opened) console.
|
|
<I>argp</I>
|
|
|
|
points to an
|
|
<I>int</I>
|
|
|
|
which is set to the
|
|
number of the vt (1 <=
|
|
<I>*argp</I>
|
|
|
|
<= MAX_NR_CONSOLES).
|
|
<DT id="58"><B>VT_GETMODE</B>
|
|
|
|
<DD>
|
|
Get mode of active vt.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="59"><DD>
|
|
|
|
|
|
struct vt_mode {
|
|
<BR> char mode; /* vt mode */
|
|
<BR> char waitv; /* if set, hang on writes if not active */
|
|
<BR> short relsig; /* signal to raise on release req */
|
|
<BR> short acqsig; /* signal to raise on acquisition */
|
|
<BR> short frsig; /* unused (set to 0) */
|
|
};
|
|
|
|
|
|
<DT id="60"><DD>
|
|
which is set to the mode of the active vt.
|
|
<I>mode</I>
|
|
|
|
is set to one of these values:
|
|
<TABLE>
|
|
<TR VALIGN=top><TD>VT_AUTO</TD><TD>auto vt switching<BR></TD></TR>
|
|
<TR VALIGN=top><TD>VT_PROCESS</TD><TD>process controls switching<BR></TD></TR>
|
|
<TR VALIGN=top><TD>VT_ACKACQ</TD><TD>acknowledge switch<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<DT id="61"><B>VT_SETMODE</B>
|
|
|
|
<DD>
|
|
Set mode of active vt.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<I>struct vt_mode</I>.
|
|
|
|
<DT id="62"><B>VT_GETSTATE</B>
|
|
|
|
<DD>
|
|
Get global vt state info.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="63"><DD>
|
|
|
|
|
|
struct vt_stat {
|
|
<BR> unsigned short v_active; /* active vt */
|
|
<BR> unsigned short v_signal; /* signal to send */
|
|
<BR> unsigned short v_state; /* vt bit mask */
|
|
};
|
|
|
|
|
|
<DT id="64"><DD>
|
|
For each vt in use, the corresponding bit in the
|
|
<I>v_state</I>
|
|
|
|
member is set.
|
|
(Kernels 1.0 through 1.1.92.)
|
|
<DT id="65"><B>VT_RELDISP</B>
|
|
|
|
<DD>
|
|
Release a display.
|
|
<DT id="66"><B>VT_ACTIVATE</B>
|
|
|
|
<DD>
|
|
Switch to vt
|
|
<I>argp</I>
|
|
|
|
(1 <=
|
|
<I>argp</I>
|
|
|
|
<= MAX_NR_CONSOLES).
|
|
<DT id="67"><B>VT_WAITACTIVE</B>
|
|
|
|
<DD>
|
|
Wait until vt
|
|
<I>argp</I>
|
|
|
|
has been activated.
|
|
<DT id="68"><B>VT_DISALLOCATE</B>
|
|
|
|
<DD>
|
|
Deallocate the memory associated with vt
|
|
<I>argp</I>.
|
|
|
|
(Since Linux 1.1.54.)
|
|
<DT id="69"><B>VT_RESIZE</B>
|
|
|
|
<DD>
|
|
Set the kernel's idea of screensize.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="70"><DD>
|
|
|
|
|
|
struct vt_sizes {
|
|
<BR> unsigned short v_rows; /* # rows */
|
|
<BR> unsigned short v_cols; /* # columns */
|
|
<BR> unsigned short v_scrollsize; /* no longer used */
|
|
};
|
|
|
|
|
|
<DT id="71"><DD>
|
|
Note that this does not change the videomode.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?8+resizecons">resizecons</A></B>(8).
|
|
|
|
(Since Linux 1.1.54.)
|
|
<DT id="72"><B>VT_RESIZEX</B>
|
|
|
|
<DD>
|
|
Set the kernel's idea of various screen parameters.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="73"><DD>
|
|
|
|
|
|
struct vt_consize {
|
|
<BR> unsigned short v_rows; /* number of rows */
|
|
<BR> unsigned short v_cols; /* number of columns */
|
|
<BR> unsigned short v_vlin; /* number of pixel rows
|
|
<BR> on screen */
|
|
<BR> unsigned short v_clin; /* number of pixel rows
|
|
<BR> per character */
|
|
<BR> unsigned short v_vcol; /* number of pixel columns
|
|
<BR> on screen */
|
|
<BR> unsigned short v_ccol; /* number of pixel columns
|
|
<BR> per character */
|
|
};
|
|
|
|
|
|
<DT id="74"><DD>
|
|
Any parameter may be set to zero, indicating "no change", but if
|
|
multiple parameters are set, they must be self-consistent.
|
|
Note that this does not change the videomode.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?8+resizecons">resizecons</A></B>(8).
|
|
|
|
(Since Linux 1.3.3.)
|
|
</DL>
|
|
<P>
|
|
|
|
The action of the following ioctls depends on the first byte in the struct
|
|
pointed to by
|
|
<I>argp</I>,
|
|
|
|
referred to here as the
|
|
<I>subcode</I>.
|
|
|
|
These are legal only for the superuser or the owner of the current terminal.
|
|
<DL COMPACT>
|
|
<DT id="75"><B>TIOCLINUX, subcode=0</B>
|
|
|
|
<DD>
|
|
Dump the screen.
|
|
Disappeared in Linux 1.1.92. (With kernel 1.1.92 or later, read from
|
|
<I>/dev/vcsN</I>
|
|
|
|
or
|
|
<I>/dev/vcsaN</I>
|
|
|
|
instead.)
|
|
<DT id="76"><B>TIOCLINUX, subcode=1</B>
|
|
|
|
<DD>
|
|
Get task information.
|
|
Disappeared in Linux 1.1.92.
|
|
<DT id="77"><B>TIOCLINUX, subcode=2</B>
|
|
|
|
<DD>
|
|
Set selection.
|
|
<I>argp</I>
|
|
|
|
points to a
|
|
<DT id="78"><DD>
|
|
|
|
|
|
struct {
|
|
<BR> char subcode;
|
|
<BR> short xs, ys, xe, ye;
|
|
<BR> short sel_mode;
|
|
};
|
|
|
|
|
|
<DT id="79"><DD>
|
|
<I>xs</I>
|
|
|
|
and
|
|
<I>ys</I>
|
|
|
|
are the starting column and row.
|
|
<I>xe</I>
|
|
|
|
and
|
|
<I>ye</I>
|
|
|
|
are the ending
|
|
column and row.
|
|
(Upper left corner is row=column=1.)
|
|
<I>sel_mode</I>
|
|
|
|
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 the static array sel_buffer in
|
|
<I>devices/char/console.c</I>.
|
|
|
|
<DT id="80"><B>TIOCLINUX, subcode=3</B>
|
|
|
|
<DD>
|
|
Paste selection.
|
|
The characters in the selection buffer are
|
|
written to
|
|
<I>fd</I>.
|
|
|
|
<DT id="81"><B>TIOCLINUX, subcode=4</B>
|
|
|
|
<DD>
|
|
Unblank the screen.
|
|
<DT id="82"><B>TIOCLINUX, subcode=5</B>
|
|
|
|
<DD>
|
|
Sets contents of a 256-bit look up table defining characters in a "word",
|
|
for word-by-word selection.
|
|
(Since Linux 1.1.32.)
|
|
<DT id="83"><B>TIOCLINUX, subcode=6</B>
|
|
|
|
<DD>
|
|
<I>argp</I>
|
|
|
|
points to a char which is set to the value of the kernel
|
|
variable
|
|
<I>shift_state</I>.
|
|
|
|
(Since Linux 1.1.32.)
|
|
<DT id="84"><B>TIOCLINUX, subcode=7</B>
|
|
|
|
<DD>
|
|
<I>argp</I>
|
|
|
|
points to a char which is set to the value of the kernel
|
|
variable
|
|
<I>report_mouse</I>.
|
|
|
|
(Since Linux 1.1.33.)
|
|
<DT id="85"><B>TIOCLINUX, subcode=8</B>
|
|
|
|
<DD>
|
|
Dump screen width and height, cursor position, and all the
|
|
character-attribute pairs.
|
|
(Kernels 1.1.67 through 1.1.91 only.
|
|
With kernel 1.1.92 or later, read from
|
|
<I>/dev/vcsa*</I>
|
|
|
|
instead.)
|
|
<DT id="86"><B>TIOCLINUX, subcode=9</B>
|
|
|
|
<DD>
|
|
Restore screen width and height, cursor position, and all the
|
|
character-attribute pairs.
|
|
(Kernels 1.1.67 through 1.1.91 only.
|
|
With kernel 1.1.92 or later, write to
|
|
<I>/dev/vcsa*</I>
|
|
|
|
instead.)
|
|
<DT id="87"><B>TIOCLINUX, subcode=10</B>
|
|
|
|
<DD>
|
|
Handles the Power Saving
|
|
feature of the new generation of monitors.
|
|
VESA screen blanking mode is set to
|
|
<I>argp[1]</I>,
|
|
|
|
which governs what
|
|
screen blanking does:
|
|
<DL COMPACT><DT id="88"><DD>
|
|
<DL COMPACT>
|
|
<DT id="89">0:<DD>
|
|
Screen blanking is disabled.
|
|
<DT id="90">1:<DD>
|
|
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.
|
|
<DT id="91">2:<DD>
|
|
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.
|
|
(<I>Caution:</I>
|
|
|
|
Powering down frequently will damage the monitor.)
|
|
(Since Linux 1.1.76.)
|
|
</DL>
|
|
</DL>
|
|
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>RETURN VALUE</H2>
|
|
|
|
On success, 0 is returned.
|
|
On error, -1 is returned, and
|
|
<I>errno</I>
|
|
|
|
is set.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>ERRORS</H2>
|
|
|
|
<I>errno</I>
|
|
|
|
may take on these values:
|
|
<DL COMPACT>
|
|
<DT id="92"><B>EBADF</B>
|
|
|
|
<DD>
|
|
The file descriptor is invalid.
|
|
<DT id="93"><B>EINVAL</B>
|
|
|
|
<DD>
|
|
The file descriptor or
|
|
<I>argp</I>
|
|
|
|
is invalid.
|
|
<DT id="94"><B>ENOTTY</B>
|
|
|
|
<DD>
|
|
The file descriptor is not associated with a character special device,
|
|
or the specified request does not apply to it.
|
|
<DT id="95"><B>EPERM</B>
|
|
|
|
<DD>
|
|
Insufficient permission.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<B>Warning</B>:
|
|
|
|
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.
|
|
<P>
|
|
|
|
Programs using these ioctls will not be portable to other versions
|
|
of UNIX, will not work on older versions of Linux, and will not work
|
|
on future versions of Linux.
|
|
<P>
|
|
|
|
Use POSIX functions.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dumpkeys">dumpkeys</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+kbd_mode">kbd_mode</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+loadkeys">loadkeys</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+mknod">mknod</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+setleds">setleds</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+setmetamode">setmetamode</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+execve">execve</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ioctl_tty">ioctl_tty</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ioperm">ioperm</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+termios">termios</A></B>(3),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?4+console_codes">console_codes</A></B>(4),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?4+mt">mt</A></B>(4),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?4+sd">sd</A></B>(4),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?4+tty">tty</A></B>(4),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?4+ttyS">ttyS</A></B>(4),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?4+vcs">vcs</A></B>(4),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?4+vcsa">vcsa</A></B>(4),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+charsets">charsets</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mapscrn">mapscrn</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+resizecons">resizecons</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+setfont">setfont</A></B>(8)
|
|
|
|
<P>
|
|
|
|
<I>/usr/include/linux/kd.h</I>,
|
|
|
|
<I>/usr/include/linux/vt.h</I>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="96"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="97"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="98"><A HREF="#lbAD">RETURN VALUE</A><DD>
|
|
<DT id="99"><A HREF="#lbAE">ERRORS</A><DD>
|
|
<DT id="100"><A HREF="#lbAF">NOTES</A><DD>
|
|
<DT id="101"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="102"><A HREF="#lbAH">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:33 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|