| VT_OPENQRY | Returns the first available (non-opened) console. argp points to an int which is set to the number of the vt (1 <= *argp <= MAX_NR_CONSOLES). |
| VT_GETMODE | Get mode of active vt. argp points to a |
| VT_SETMODE | Set mode of active vt. argp points to a struct vt_mode. |
| VT_GETSTATE | Get global vt state info. argp points to a |
| VT_RELDISP | Release a display. |
| VT_ACTIVATE | Switch to vt argp (1 <= argp <= MAX_NR_CONSOLES). |
| VT_WAITACTIVE | Wait until vt argp has been activated. |
| VT_DISALLOCATE | Deallocate the memory associated with vt argp. (Since Linux 1.1.54.) |
| VT_RESIZE | Set the kernel's idea of screensize. argp points to a |
| VT_RESIZEX | Set the kernel's idea of various screen parameters. argp points to a |
| EINVAL | argp is invalid. |
NAME
ioctl_vt - ioctls for console terminal and virtual consoles
SYNOPSIS
#include <linux/vt.h>\n /* Definition of \nVT_*\n constants */
\n#include <sys/ioctl.h>int ioctl(int \nfd\n, unsigned long \nop\n, void *\nargp\n);DESCRIPTION
The following Linux-specific ioctl(2) operations are supported for console terminals and virtual consoles.
- VT_OPENQRY
Returns the first available (non-opened) console. argp points to an int which is set to the number of the vt (1 <= *argp <= MAX_NR_CONSOLES).
- VT_GETMODE
Get mode of active vt. argp points to a
- bash
struct vt_mode { \n char mode; /* vt mode */ \n char waitv; /* if set, hang on writes if not active */ \n short relsig; /* signal to raise on release op */ \n short acqsig; /* signal to raise on acquisition */ \n short frsig; /* unused (set to 0) */ }; VT_AUTO auto vt switching VT_PROCESS process controls switching VT_ACKACQ acknowledge switch
- VT_SETMODE
Set mode of active vt. argp points to a struct vt_mode.
- VT_GETSTATE
Get global vt state info. argp points to a
- bash
struct vt_stat { \n unsigned short v_active; /* active vt */ \n unsigned short v_signal; /* signal to send */ \n unsigned short v_state; /* vt bit mask */ }; For each vt in use, the corresponding bit in the v_state member is set. (Linux 1.0 through Linux 1.1.92.)
- VT_RELDISP
Release a display.
- VT_ACTIVATE
Switch to vt argp (1 <= argp <= MAX_NR_CONSOLES).
- VT_WAITACTIVE
Wait until vt argp has been activated.
- VT_DISALLOCATE
Deallocate the memory associated with vt argp. (Since Linux 1.1.54.)
- VT_RESIZE
Set the kernel's idea of screensize. argp points to a
- bash
struct vt_sizes { \n unsigned short v_rows; /* # rows */ \n unsigned short v_cols; /* # columns */ \n unsigned short v_scrollsize; /* no longer used */ }; Note that this does not change the videomode. See resizecons(8). (Since Linux 1.1.54.)
- VT_RESIZEX
Set the kernel's idea of various screen parameters. argp points to a
- bash
struct vt_consize { \n unsigned short v_rows; /* number of rows */ \n unsigned short v_cols; /* number of columns */ \n unsigned short v_vlin; /* number of pixel rows \n on screen */ \n unsigned short v_clin; /* number of pixel rows \n per character */ \n unsigned short v_vcol; /* number of pixel columns \n on screen */ \n unsigned short v_ccol; /* number of pixel columns \n per character */ }; 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 resizecons(8). (Since Linux 1.3.3.)
RETURN VALUE
On success, 0 is returned (except where indicated). On failure, -1 is returned, and errno is set to indicate the error.
ERRORS
- EINVAL
argp is invalid.
STANDARDS
Linux.
SEE ALSO
ioctl(2), ioctl_console(2)