AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
vt.c File Reference

Virtual terminals: /dev/tty1 to /dev/tty6 (character device 4, 1 to 6), and /dev/console, which is the first one. More...

#include <core/system.h>
#include <core/module.h>
#include <core/string.h>
#include <console/earlycon.h>
#include <dev/dev.h>
#include <dev/vt.h>
#include <fs/posix.h>
#include <sys/sched.h>
#include <sys/signal.h>
#include <sys/uaccess.h>

Go to the source code of this file.

Macros

#define VT_RING   4096

Functions

uint32_t vt_palette (uint8_t color)
 Returns one of the 256 colours of xterm's palette: the 16 colours, a 6 x 6 x 6 cube, and 24 greys.
static uint8_t color16 (uint8_t color)
 Returns the closest of the 16 colours to one of the 256.
uint8_t vt_vga_attr (struct vt_cell cell)
 Returns the VGA text mode attribute of a cell (its colours, in VGA's order), for the VGA display and /dev/vcsa.
static void refresh (struct vt *vt, int all)
 Draws the cells of the foreground terminal that changed, or all of them with all, and moves the cursor.
static ssize_t vt_tty_output (struct tty *tty, size_t size, void *buf)
 Takes the terminal's output: it goes through the emulator to the screen.
static ssize_t vt_tty_input (struct tty *tty, size_t size, void *buf)
 Takes the terminal's input, after line editing, for its readers.
static void vt_input_flush (struct tty *tty)
 Drops the input waiting to be read (tcflush()).
static void vt_input_to (struct vt *vt, const char *buf, size_t size)
 Gives input to a terminal: key presses, or replies to requests.
static void vt_reply (struct vt *vt)
 Gives the replies to requests that programs wrote (DSR, DA) to the terminal, as input.
static int vt_setup (struct vt *vt)
 Sets a terminal up the first time it is used: its screen, its input ring and its terminal.
struct vt * vt_foreground (void)
 Returns the terminal in the foreground.
static int proc_alive (pid_t pid)
 Returns whether a process is still running.
static void vt_check (struct vt *vt)
 Undoes the modes that a process which is gone had set on a terminal (graphics mode, raw keyboard, VT_PROCESS).
static void vt_signal (struct vt *vt, int signal)
 Sends a signal to the process that put a terminal in VT_PROCESS mode.
static void vt_switch_now (int id)
 Switches to terminal id (an index) at once: it is set up if needed, drawn, and its VT_PROCESS process is told.
void vt_switch (int id)
 Switches to another terminal, for Alt+Fn and VT_ACTIVATE.
void vt_keypress (void)
 Undoes, at a key press, the modes that a process which is gone had set on the foreground terminal: otherwise the keyboard could be left to no one.
void vt_input (const char *buf, size_t size)
 Gives what keys sent to the foreground terminal, as input.
static void vt_kmsg (const char *s, size_t len)
 Writes kernel messages to the foreground terminal's screen.
static struct vt * vt_get (struct devid *dd)
 Returns the terminal of a device number: /dev/console is the first one, /dev/tty0 the one in the foreground.
static struct vt * vt_file (struct file *file)
 Returns the terminal of an open file.
static ssize_t vt_read (struct devid *dd, off_t offset, struct iobuf *io)
 Reads a terminal's input.
static ssize_t vt_write (struct devid *dd, off_t offset, struct iobuf *io)
 Writes to a terminal's screen.
static int vt_in_use (struct vt *vt)
 Returns whether a terminal is in use, so that VT_OPENQRY doesn't give it.
static size_t vt_ioctl_argsize (int request)
 Returns the size of the user memory that a KD* or VT_* request reads or writes, or 0 if its argument is a value.
static int vt_kd_ioctl (struct vt *vt, int request, void *argp)
 Handles the Linux console's KD* and VT_* requests.
static int vt_ioctl (struct devid *dd, int request, void *argp)
 Handles a terminal's ioctl()s: the console's own (KD*, VT_*), through a kernel copy of their argument, and the terminal's.
static int vt_file_open (struct file *file)
 Opens a terminal, setting it up the first time.
static int vt_file_close (struct file *file)
 Closes a terminal.
static int vt_file_eof (struct file *file)
 Returns whether a read that found no data is at the end of the file.
static uint64_t vt_read_timeout (struct file *file)
 Returns how long a read may wait, from the terminal's mode (VTIME), or 0 for no limit.
static int vt_can_read (struct file *file, size_t size)
 Returns whether a read wouldn't have to wait.
static ssize_t vcs_read (struct devid *dd, off_t offset, struct iobuf *io)
 Reads a terminal's screen.
static void vt_kmsg_replay (void)
 Shows the kernel messages printed so far, before the terminals were set up.
static int vt_probe (void)
 Sets the virtual terminals up at boot, on the framebuffer or in VGA text mode, and shows the first one, with the kernel messages.

Variables

static struct vt vts [VT_COUNT]
static struct vt * fg
static struct vt_display * display
static struct vt_cell * shown
static int busy
static int pending = -1
static struct waitq active_queue
static const uint32_t ansi_colors [16]
struct dev vtdev
static struct dev vcsdev

Detailed Description

Virtual terminals: /dev/tty1 to /dev/tty6 (character device 4, 1 to 6), and /dev/console, which is the first one.

What programs write to a terminal goes through the terminal emulator (term.c) to its screen, and key presses (keyboard.c) go through the line discipline to its readers. Only the terminal in the foreground is shown, on the framebuffer or in VGA text mode; the others keep their screens in memory. /dev/tty0 is the foreground terminal.

/dev/vcsN and /dev/vcsaN (character device 7, minors N and 128 + N; N = 0 is the foreground terminal) read the screen of /dev/ttyN, as on Linux.

Programs that draw on the framebuffer themselves (an X server) use the Linux console's ioctl()s: KDSETMODE (with KD_GRAPHICS, the terminal isn't drawn), KDSKBMODE (scancodes or key codes instead of characters), and VT_* to switch terminals, or to be asked before a switch (VT_PROCESS). Once the process that set these modes is gone, they are undone; otherwise the screen would be left to no one.

Definition in file vt.c.

Macro Definition Documentation

◆ VT_RING

#define VT_RING   4096

Definition at line 39 of file vt.c.

Referenced by vt_setup().

Function Documentation

◆ color16()

uint8_t color16 ( uint8_t color)
static

Returns the closest of the 16 colours to one of the 256.

Definition at line 90 of file vt.c.

References ansi_colors, color16(), and vt_palette().

Referenced by color16(), and vt_vga_attr().

◆ proc_alive()

int proc_alive ( pid_t pid)
static

Returns whether a process is still running.

Definition at line 267 of file vt.c.

References proc::pid, proc_alive(), proc_pid_find(), and proc::running.

Referenced by proc_alive(), and vt_check().

◆ refresh()

void refresh ( struct vt * vt,
int all )
static

Draws the cells of the foreground terminal that changed, or all of them with all, and moves the cursor.

A terminal that isn't shown, or is in graphics mode, isn't drawn.

Definition at line 149 of file vt.c.

References vt_cell::attr, vt::col, vt::cols, cursor, vt_display::cursor, vt::cursor_visible, display, vt_display::draw, fg, vt::kd_mode, memcmp(), refresh(), vt::reverse_screen, vt::row, vt::rows, vt::screen, shown, VT_CURSOR, and VT_REVERSE.

Referenced by refresh(), vt_check(), vt_input(), vt_kd_ioctl(), vt_kmsg(), vt_switch_now(), and vt_write().

◆ vcs_read()

ssize_t vcs_read ( struct devid * dd,
off_t offset,
struct iobuf * io )
static

Reads a terminal's screen.

/dev/vcsN gives the characters of the screen, row after row. /dev/vcsaN gives the rows, the columns, and the cursor's column and row (a byte each), then each character with its VGA attribute.

Definition at line 801 of file vt.c.

References cells(), vt_cell::ch, vt::col, vt::cols, fg, iobuf_out(), devid::minor, NULL, iobuf::resid, vt::row, vt::rows, vt::screen, vt::tty, vcs_read(), VT_COUNT, vt_vga_attr(), and vts.

Referenced by vcs_read().

◆ vt_can_read()

int vt_can_read ( struct file * file,
size_t size )
static

Returns whether a read wouldn't have to wait.

Definition at line 768 of file vt.c.

References vt::in, vt::tty, tty_can_read(), vt_can_read(), and vt_file().

Referenced by vt_can_read().

◆ vt_check()

void vt_check ( struct vt * vt)
static

Undoes the modes that a process which is gone had set on a terminal (graphics mode, raw keyboard, VT_PROCESS).

Definition at line 275 of file vt.c.

References vt::kb_mode, vt::kd_mode, vt::kd_pid, vt::mode, vt::mode_pid, proc_alive(), refresh(), vt_check(), and vt_keyboard_reset().

Referenced by vt_check(), vt_kd_ioctl(), vt_keypress(), vt_switch(), and vt_switch_now().

◆ vt_file()

struct vt * vt_file ( struct file * file)
static

Returns the terminal of an open file.

Definition at line 434 of file vt.c.

References VNODE_DEV, vt_file(), and vt_get().

Referenced by vt_can_read(), vt_file(), vt_file_close(), vt_file_eof(), vt_file_open(), and vt_read_timeout().

◆ vt_file_close()

int vt_file_close ( struct file * file)
static

Closes a terminal.

Definition at line 739 of file vt.c.

References DEV_MAJOR, DEV_MINOR, vt::opens, posix_file_close(), vt_file(), and vt_file_close().

Referenced by vt_file_close().

◆ vt_file_eof()

int vt_file_eof ( struct file * file)
static

Returns whether a read that found no data is at the end of the file.

Definition at line 753 of file vt.c.

References vt::tty, tty_eof(), vt_file(), and vt_file_eof().

Referenced by vt_file_eof().

◆ vt_file_open()

int vt_file_open ( struct file * file)
static

Opens a terminal, setting it up the first time.

It may become the process's controlling terminal (tty_open()).

Definition at line 701 of file vt.c.

References DEV_MAJOR, DEV_MINOR, vt::opens, vt::tty, tty_open(), tty::vnode, vt::vnode, vt_file(), vt_file_open(), vt_setup(), and vt::write_queue.

Referenced by vt_file_open().

◆ vt_foreground()

struct vt * vt_foreground ( void )

Returns the terminal in the foreground.

Returns
the terminal, or NULL before the terminals are set up

Definition at line 261 of file vt.c.

References fg, and vt_foreground().

Referenced by cursor_key(), vt_foreground(), and vt_scancode().

◆ vt_get()

struct vt * vt_get ( struct devid * dd)
static

Returns the terminal of a device number: /dev/console is the first one, /dev/tty0 the one in the foreground.

Definition at line 419 of file vt.c.

References fg, devid::major, devid::minor, NULL, VT_COUNT, vt_get(), and vts.

Referenced by vt_file(), vt_get(), vt_ioctl(), vt_read(), and vt_write().

◆ vt_in_use()

int vt_in_use ( struct vt * vt)
static

Returns whether a terminal is in use, so that VT_OPENQRY doesn't give it.

Definition at line 481 of file vt.c.

References vt::opens, tty::session, vt::tty, and vt_in_use().

Referenced by vt_in_use(), and vt_kd_ioctl().

◆ vt_input()

void vt_input ( const char * buf,
size_t size )

Gives what keys sent to the foreground terminal, as input.

Parameters
bufwhat the keys sent
sizeits size, in bytes

Definition at line 375 of file vt.c.

References busy, fg, refresh(), vt_input(), vt_input_to(), and vt_reply().

Referenced by send(), send_byte(), send_char(), and vt_input().

◆ vt_input_flush()

void vt_input_flush ( struct tty * tty)
static

Drops the input waiting to be read (tcflush()).

Definition at line 194 of file vt.c.

References vt::in, tty::p, and vt_input_flush().

Referenced by vt_input_flush(), and vt_setup().

◆ vt_input_to()

void vt_input_to ( struct vt * vt,
const char * buf,
size_t size )
static

Gives input to a terminal: key presses, or replies to requests.

Definition at line 204 of file vt.c.

References vt::tty, tty_master_write(), vt_input_to(), and waitq_wakeup().

Referenced by vt_input(), vt_input_to(), and vt_reply().

◆ vt_ioctl()

int vt_ioctl ( struct devid * dd,
int request,
void * argp )
static

Handles a terminal's ioctl()s: the console's own (KD*, VT_*), through a kernel copy of their argument, and the terminal's.

Definition at line 666 of file vt.c.

References vt::mode, vt::tty, tty_ioctl(), vt_get(), vt_ioctl(), vt_ioctl_argsize(), and vt_kd_ioctl().

Referenced by vt_ioctl().

◆ vt_ioctl_argsize()

size_t vt_ioctl_argsize ( int request)
static

Returns the size of the user memory that a KD* or VT_* request reads or writes, or 0 if its argument is a value.

Definition at line 488 of file vt.c.

References vt_ioctl_argsize().

Referenced by vt_ioctl(), and vt_ioctl_argsize().

◆ vt_kd_ioctl()

int vt_kd_ioctl ( struct vt * vt,
int request,
void * argp )
static

Handles the Linux console's KD* and VT_* requests.

The argument is a value, or a pointer to the kernel's copy of the user's memory (vt_ioctl() copies it in and out).

Definition at line 512 of file vt.c.

References active_queue, curproc, vt_display::cursor, display, fg, vt::id, vt::kb_mode, vt::kd_mode, vt::kd_pid, vt::mode, vt::mode_pid, pending, refresh(), vt_check(), VT_COUNT, vt_in_use(), vt_kd_ioctl(), vt_keyboard_reset(), vt_keymap(), vt_switch(), vt_switch_now(), vts, and waitq_sleep().

Referenced by vt_ioctl(), and vt_kd_ioctl().

◆ vt_keypress()

void vt_keypress ( void )

Undoes, at a key press, the modes that a process which is gone had set on the foreground terminal: otherwise the keyboard could be left to no one.

Definition at line 363 of file vt.c.

References fg, vt_check(), and vt_keypress().

Referenced by vt_keypress(), and vt_scancode().

◆ vt_kmsg()

void vt_kmsg ( const char * s,
size_t len )
static

Writes kernel messages to the foreground terminal's screen.

Definition at line 388 of file vt.c.

References busy, fg, refresh(), vt::state, vt::utf8_left, vt_kmsg(), and vt_term_write().

Referenced by vt_kmsg(), vt_kmsg_replay(), and vt_probe().

◆ vt_kmsg_replay()

void vt_kmsg_replay ( void )
static

Shows the kernel messages printed so far, before the terminals were set up.

Definition at line 867 of file vt.c.

References ringbuf::buf, kmsg, MIN, vt_kmsg(), and vt_kmsg_replay().

Referenced by vt_kmsg_replay(), and vt_probe().

◆ vt_palette()

uint32_t vt_palette ( uint8_t color)

Returns one of the 256 colours of xterm's palette: the 16 colours, a 6 x 6 x 6 cube, and 24 greys.

Parameters
colorthe colour's number
Returns
the colour, as 0xRRGGBB

Definition at line 73 of file vt.c.

References ansi_colors, and vt_palette().

Referenced by color16(), fb_draw(), and vt_palette().

◆ vt_probe()

int vt_probe ( void )
static

Sets the virtual terminals up at boot, on the framebuffer or in VGA text mode, and shows the first one, with the kernel messages.

Definition at line 886 of file vt.c.

References vt_display::cols, display, earlycon_disable(), earlycon_on_screen(), fg, vt::id, vt::kb_mode, kdev_chrdev_register(), kmalloc(), vt_display::name, NULL, printk(), printk_console(), vt_display::rows, shown, vcsdev, VT_COUNT, vt_fb_display, vt_fb_probe(), vt_kmsg(), vt_kmsg_replay(), vt_probe(), vt_switch_now(), vt_vga_display, vt_vga_probe(), and vts.

Referenced by vt_probe().

◆ vt_read()

ssize_t vt_read ( struct devid * dd,
off_t offset,
struct iobuf * io )
static

Reads a terminal's input.

A process of a background group gets SIGTTIN instead.

Definition at line 441 of file vt.c.

References vt::in, iobuf::resid, vt::tty, tty_background(), vt_get(), and vt_read().

Referenced by vt_read().

◆ vt_read_timeout()

uint64_t vt_read_timeout ( struct file * file)
static

Returns how long a read may wait, from the terminal's mode (VTIME), or 0 for no limit.

Definition at line 761 of file vt.c.

References vt::tty, tty_read_timeout(), vt_file(), and vt_read_timeout().

Referenced by vt_read_timeout().

◆ vt_reply()

void vt_reply ( struct vt * vt)
static

Gives the replies to requests that programs wrote (DSR, DA) to the terminal, as input.

Definition at line 212 of file vt.c.

References memcpy(), vt::reply, vt::reply_len, vt_input_to(), and vt_reply().

Referenced by vt_input(), vt_reply(), and vt_write().

◆ vt_setup()

int vt_setup ( struct vt * vt)
static

Sets a terminal up the first time it is used: its screen, its input ring and its terminal.

Returns 0 or a negative errno.

Definition at line 228 of file vt.c.

References vt::cols, vt_display::cols, display, vt::in, tty::input_flush, NULL, vt::rows, vt_display::rows, vt::tty, tty_new(), vt_input_flush(), VT_RING, vt_setup(), vt_term_init(), vt_tty_input(), vt_tty_output(), and tty::ws.

Referenced by vt_file_open(), vt_setup(), and vt_switch_now().

◆ vt_signal()

void vt_signal ( struct vt * vt,
int signal )
static

Sends a signal to the process that put a terminal in VT_PROCESS mode.

Definition at line 296 of file vt.c.

References vt::mode_pid, proc_pid_find(), signal_proc_send(), and vt_signal().

Referenced by vt_signal(), vt_switch(), and vt_switch_now().

◆ vt_switch()

void vt_switch ( int id)

Switches to another terminal, for Alt+Fn and VT_ACTIVATE.

If the foreground terminal's process asked to decide (VT_PROCESS), it is asked instead, and the switch waits for its answer (VT_RELDISP).

Parameters
idthe terminal's index: 0 for /dev/tty1

Definition at line 341 of file vt.c.

References fg, vt::id, vt::mode, pending, vt_check(), VT_COUNT, vt_signal(), vt_switch(), vt_switch_now(), and vts.

Referenced by vt_kd_ioctl(), vt_scancode(), and vt_switch().

◆ vt_switch_now()

void vt_switch_now ( int id)
static

Switches to terminal id (an index) at once: it is set up if needed, drawn, and its VT_PROCESS process is told.

Definition at line 306 of file vt.c.

References active_queue, vt_display::cursor, display, fg, vt::id, vt::kb_mode, vt::kd_mode, vt::mode, pending, refresh(), vt_check(), vt_keyboard_reset(), vt_setup(), vt_signal(), vt_switch_now(), vts, and waitq_wakeup().

Referenced by vt_kd_ioctl(), vt_probe(), vt_switch(), and vt_switch_now().

◆ vt_tty_input()

ssize_t vt_tty_input ( struct tty * tty,
size_t size,
void * buf )
static

Takes the terminal's input, after line editing, for its readers.

Definition at line 187 of file vt.c.

References vt::in, tty::p, and vt_tty_input().

Referenced by vt_setup(), and vt_tty_input().

◆ vt_tty_output()

ssize_t vt_tty_output ( struct tty * tty,
size_t size,
void * buf )
static

Takes the terminal's output: it goes through the emulator to the screen.

Definition at line 180 of file vt.c.

References tty::p, vt_term_write(), and vt_tty_output().

Referenced by vt_setup(), and vt_tty_output().

◆ vt_vga_attr()

uint8_t vt_vga_attr ( struct vt_cell cell)

Returns the VGA text mode attribute of a cell (its colours, in VGA's order), for the VGA display and /dev/vcsa.

Parameters
cellthe cell
Returns
the attribute byte: the background in bits 4 to 6, the foreground in bits 0 to 3

Definition at line 122 of file vt.c.

References vt_cell::attr, vt_cell::bg, color16(), fg, vt_cell::fg, vga, VT_BOLD, VT_INVISIBLE, VT_REVERSE, and vt_vga_attr().

Referenced by vcs_read(), vga_draw(), and vt_vga_attr().

◆ vt_write()

ssize_t vt_write ( struct devid * dd,
off_t offset,
struct iobuf * io )
static

Writes to a terminal's screen.

With TOSTOP, a process of a background group gets SIGTTOU instead.

Definition at line 456 of file vt.c.

References busy, refresh(), tty::tios, vt::tty, tty_background(), tty_slave_write(), tty_write_iobuf(), vt_get(), vt_reply(), and vt_write().

Referenced by vt_write().

Variable Documentation

◆ active_queue

struct waitq active_queue
static

Definition at line 58 of file vt.c.

Referenced by vt_kd_ioctl(), and vt_switch_now().

◆ ansi_colors

const uint32_t ansi_colors[16]
static
Initial value:
= {
0x000000, 0xaa0000, 0x00aa00, 0xaa5500, 0x0000aa, 0xaa00aa, 0x00aaaa, 0xaaaaaa,
0x555555, 0xff5555, 0x55ff55, 0xffff55, 0x5555ff, 0xff55ff, 0x55ffff, 0xffffff,
}

Definition at line 61 of file vt.c.

Referenced by color16(), and vt_palette().

◆ busy

int busy
static

Definition at line 51 of file vt.c.

Referenced by vt_input(), vt_kmsg(), and vt_write().

◆ display

struct vt_display* display
static

Definition at line 44 of file vt.c.

Referenced by refresh(), vt_kd_ioctl(), vt_probe(), vt_setup(), and vt_switch_now().

◆ fg

◆ pending

int pending = -1
static

Definition at line 55 of file vt.c.

Referenced by arp_resolve(), pending_flush(), vt_kd_ioctl(), vt_switch(), and vt_switch_now().

◆ shown

struct vt_cell* shown
static

Definition at line 47 of file vt.c.

Referenced by refresh(), and vt_probe().

◆ vcsdev

struct dev vcsdev
static
Initial value:
= {
.name = "vcs",
.read = vcs_read,
.fops = {
.open = posix_file_open,
.read = posix_file_read,
.lseek = posix_file_lseek,
.can_read = __vfs_can_always,
.can_write = __vfs_can_never,
.eof = __vfs_eof_always,
},
}
off_t posix_file_lseek(struct file *file, off_t offset, int whence)
Moves an open file's offset: to offset (SEEK_SET), by offset from where it is (SEEK_CUR),...
Definition lseek.c:22
int posix_file_open(struct file *file)
Finishes opening a file: with O_TRUNC, a regular file is truncated to 0 bytes.
Definition open.c:17
ssize_t posix_file_read(struct file *file, struct iobuf *io)
Reads from an open file at its offset, and moves the offset past what was read.
Definition read.c:29
static ssize_t vcs_read(struct devid *dd, off_t offset, struct iobuf *io)
Reads a terminal's screen.
Definition vt.c:801

Definition at line 850 of file vt.c.

Referenced by vt_probe().

◆ vtdev

struct dev vtdev
Initial value:
= {
.name = "vt",
.read = vt_read,
.write = vt_write,
.ioctl = vt_ioctl,
.fops = {
.open = vt_file_open,
.close = vt_file_close,
.read = posix_file_read,
.write = posix_file_write,
.ioctl = posix_file_ioctl,
.can_read = vt_can_read,
.can_write = __vfs_can_always,
.eof = vt_file_eof,
.read_timeout = vt_read_timeout,
},
}
int posix_file_ioctl(struct file *file, int request, void *argp)
Passes an ioctl() request on to the file's vnode (a device's, or its filesystem's).
Definition ioctl.c:19
ssize_t posix_file_write(struct file *file, struct iobuf *io)
Writes to an open file at its offset, and moves the offset past what was written.
Definition write.c:25
static ssize_t vt_write(struct devid *dd, off_t offset, struct iobuf *io)
Writes to a terminal's screen.
Definition vt.c:456
static int vt_ioctl(struct devid *dd, int request, void *argp)
Handles a terminal's ioctl()s: the console's own (KD*, VT_*), through a kernel copy of their argument...
Definition vt.c:666
static ssize_t vt_read(struct devid *dd, off_t offset, struct iobuf *io)
Reads a terminal's input.
Definition vt.c:441
static int vt_file_close(struct file *file)
Closes a terminal.
Definition vt.c:739
static uint64_t vt_read_timeout(struct file *file)
Returns how long a read may wait, from the terminal's mode (VTIME), or 0 for no limit.
Definition vt.c:761
static int vt_can_read(struct file *file, size_t size)
Returns whether a read wouldn't have to wait.
Definition vt.c:768
static int vt_file_open(struct file *file)
Opens a terminal, setting it up the first time.
Definition vt.c:701
static int vt_file_eof(struct file *file)
Returns whether a read that found no data is at the end of the file.
Definition vt.c:753

Definition at line 774 of file vt.c.

Referenced by sttydev_mux(), and ttydev_mux().

◆ vts

struct vt vts[VT_COUNT]
static

Definition at line 41 of file vt.c.

Referenced by vcs_read(), vt_get(), vt_kd_ioctl(), vt_probe(), vt_switch(), and vt_switch_now().