Movatterモバイル変換


[0]ホーム

URL:


man7.org > Linux >man-pages

Linux/UNIX system programming training


ioctl_vt(2) — Linux manual page

NAME |SYNOPSIS |DESCRIPTION |RETURN VALUE |ERRORS |STANDARDS |SEE ALSO |COLOPHON

ioctl_vt(2)                System Calls Manualioctl_vt(2)

NAME        top

       ioctl_vt - ioctls for console terminal and virtual consoles

SYNOPSIS        top

#include <linux/vt.h>/* Definition ofVT_*constants */#include <sys/ioctl.h>int ioctl(intfd, unsigned longop, void *argp);

DESCRIPTION        top

       The following Linux-specificioctl(2) operations are supported for       console terminals and virtual consoles.VT_OPENQRY              Returns the first available (non-opened) console.argp              points to anint 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                  struct vt_mode {                      char  mode;    /* vt mode */                      char  waitv;   /* if set, hang on writes if not active */                      short relsig;  /* signal to raise on release op */                      short acqsig;  /* signal to raise on acquisition */                      short frsig;   /* unused (set to 0) */                  };              which is set to the mode of the active vt.mode is set to              one of these values:              VT_AUTO      auto vt switching              VT_PROCESS   process controls switching              VT_ACKACQ    acknowledge switchVT_SETMODE              Set mode of active vt.argp points to astruct vt_mode.VT_GETSTATE              Get global vt state info.argp points to a                  struct vt_stat {                      unsigned short v_active;  /* active vt */                      unsigned short v_signal;  /* signal to send */                      unsigned short v_state;   /* vt bit mask */                  };              For each vt in use, the corresponding bit in thev_state              member is set.  (Linux 1.0 through Linux 1.1.92.)VT_RELDISP              Release a display.VT_ACTIVATE              Switch to vtargp (1 <=argp <= MAX_NR_CONSOLES).VT_WAITACTIVE              Wait until vtargp has been activated.VT_DISALLOCATE              Deallocate the memory associated with vtargp.  (Since              Linux 1.1.54.)VT_RESIZE              Set the kernel's idea of screensize.argp points to a                  struct vt_sizes {                      unsigned short v_rows;       /* # rows */                      unsigned short v_cols;       /* # columns */                      unsigned short v_scrollsize; /* no longer used */                  };              Note that this does not change the videomode.  Seeresizecons(8).  (Since Linux 1.1.54.)VT_RESIZEX              Set the kernel's idea of various screen parameters.argp              points to a                  struct vt_consize {                      unsigned short v_rows;  /* number of rows */                      unsigned short v_cols;  /* number of columns */                      unsigned short v_vlin;  /* number of pixel rows                                                 on screen */                      unsigned short v_clin;  /* number of pixel rows                                                 per character */                      unsigned short v_vcol;  /* number of pixel columns                                                 on screen */                      unsigned short v_ccol;  /* number of pixel columns                                                 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.              Seeresizecons(8).  (Since Linux 1.3.3.)VT_GETCONSIZECSRPOS              Get console size and cursor position.argp points to a                  struct vt_consizecsrpos {                      __u16 con_rows;  /* number of console rows */                      __u16 con_cols;  /* number of console columns */                      __u16 csr_row;   /* current cursor's row */                      __u16 csr_col;   /* current cursor's column */                  };              (Since Linux 6.16.)

RETURN VALUE        top

       On success, 0 is returned (except where indicated).  On failure,       -1 is returned, anderrno is set to indicate the error.

ERRORS        top

EINVALargp is invalid.

STANDARDS        top

       Linux.

SEE ALSO        top

ioctl(2),ioctl_console(2)

COLOPHON        top

       This page is part of theman-pages (Linux kernel and C library       user-space interface documentation) project.  Information about       the project can be found at        ⟨https://www.kernel.org/doc/man-pages/⟩.  If you have a bug report       for this manual page, see       ⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.       This page was obtained from the tarball man-pages-6.15.tar.gz       fetched from       ⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on       2025-08-11.  If you discover any rendering problems in this HTML       version of the page, or you believe there is a better or more up-       to-date source for the page, or you have corrections or       improvements to the information in this COLOPHON (which isnot       part of the original manual page), send a mail to       man-pages@man7.orgLinux man-pages 6.15            2025-06-11ioctl_vt(2)

Pages that refer to this page:ioctl_console(2)



HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface.

For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere.

Hosting byjambit GmbH.

Cover of TLPI


[8]ページ先頭

©2009-2025 Movatter.jp