|
AquilaOS documentation
How it works, and its code
|
The terminal devices' numbers: which driver each one is. More...
#include <core/system.h>#include <core/module.h>#include <dev/ttydev.h>#include <fs/posix.h>#include <sys/sched.h>#include <dev/tty.h>#include <dev/vt.h>#include <fs/vfs.h>Go to the source code of this file.
Functions | |
| struct dev * | sttydev_mux (struct devid *dd) |
| Picks the driver of a terminal of major 4, by its minor: the virtual terminals' for minors up to VT_COUNT, the UARTs' for 64 and up. | |
| static int | ctty_open (struct file *file) |
| Opens /dev/tty: the file is made the controlling terminal's device instead. | |
| struct dev * | ttydev_mux (struct devid *dd) |
| Picks the driver of a terminal device of major 5, by its minor. | |
| int | ttydev_probe () |
| Registers the terminal devices, majors 4 and 5. | |
Variables | |
| static struct dev | cttydev |
| struct dev | sttydev |
| struct dev | ttydev |
The terminal devices' numbers: which driver each one is.
Major 4 is the terminals themselves: /dev/tty0 to /dev/tty6, the virtual terminals (minor 0 is the one in the foreground), and /dev/ttyS0 and up, the UARTs (minors 64 and up). Major 5 is the special ones: /dev/tty (the process's controlling terminal), /dev/console and /dev/ptmx. These are Linux's numbers.
Definition in file tty.c.
|
static |
Opens /dev/tty: the file is made the controlling terminal's device instead.
Fails with ENXIO if the process has no controlling terminal.
Definition at line 45 of file tty.c.
References ctty_open(), curproc, kdev_file_open(), vnode::ref, vfs_close(), tty::vnode, and VNODE_DEV.
Referenced by ctty_open().
Picks the driver of a terminal of major 4, by its minor: the virtual terminals' for minors up to VT_COUNT, the UARTs' for 64 and up.
| dd | the device's number |
Definition at line 27 of file tty.c.
References devid::minor, NULL, sttydev_mux(), VT_COUNT, and vtdev.
Referenced by sttydev_mux().
Picks the driver of a terminal device of major 5, by its minor.
| dd | the device's number |
Definition at line 81 of file tty.c.
References cttydev, devid::minor, NULL, ptmdev, ttydev_mux(), and vtdev.
Referenced by ttydev_mux().
| int ttydev_probe | ( | ) |
Registers the terminal devices, majors 4 and 5.
Definition at line 109 of file tty.c.
References kdev_chrdev_register(), sttydev, ttydev, and ttydev_probe().
Referenced by ttydev_probe().
|
static |
| struct dev sttydev |
Definition at line 116 of file tty.c.
Referenced by ttydev_probe().
| struct dev ttydev |
Definition at line 121 of file tty.c.
Referenced by ttydev_probe().