The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
termios.h File Reference
#include "common/stdint.h"

Go to the source code of this file.

Data Structures

struct  ktermios
struct  kwinsize

Macros

#define NCCS   19
 the console's terminal settings (termios) and the job-control ioctls.
#define INLCR   0x0040
#define IGNCR   0x0080
#define ICRNL   0x0100
#define OPOST   0x0001
#define ONLCR   0x0004
#define CS8   0x0030
#define CREAD   0x0080
#define ISIG   0x0001
#define ICANON   0x0002
#define ECHO   0x0008
#define ECHOE   0x0010
#define ECHOK   0x0020
#define TOSTOP   0x0100
#define IEXTEN   0x8000
#define XKEYEVENTS   0x40000000
#define XKEYRAW   0x20000000
#define VINTR   0
#define VQUIT   1
#define VERASE   2
#define VKILL   3
#define VEOF   4
#define VTIME   5
#define VMIN   6
#define VSUSP   10
#define TCGETS   0x5401
#define TCSETS   0x5402
#define TCSETSW   0x5403
#define TCSETSF   0x5404
#define TIOCSCTTY   0x540E
#define TIOCGPGRP   0x540F
#define TIOCSPGRP   0x5410
#define TIOCGWINSZ   0x5413
#define TIOCSWINSZ   0x5414
#define TIOCGPTN   0x80045430
#define TIOCSPTLCK   0x40045431

Functions

void console_terminal_init (uint32_t init_pid)
 set up the console terminal: default settings, and init's session as the one it controls (with init's group in the foreground).

Macro Definition Documentation

◆ NCCS

#define NCCS   19

the console's terminal settings (termios) and the job-control ioctls.

the layout, flags and request numbers are ABI: the libc's <termios.h> and <sys/ioctl.h> have the same ones (the Linux i386 values).

◆ INLCR

#define INLCR   0x0040

◆ IGNCR

#define IGNCR   0x0080

◆ ICRNL

#define ICRNL   0x0100

◆ OPOST

#define OPOST   0x0001

◆ ONLCR

#define ONLCR   0x0004

◆ CS8

#define CS8   0x0030

◆ CREAD

#define CREAD   0x0080

◆ ISIG

#define ISIG   0x0001

◆ ICANON

#define ICANON   0x0002

◆ ECHO

#define ECHO   0x0008

◆ ECHOE

#define ECHOE   0x0010

◆ ECHOK

#define ECHOK   0x0020

◆ TOSTOP

#define TOSTOP   0x0100

◆ IEXTEN

#define IEXTEN   0x8000

◆ XKEYEVENTS

#define XKEYEVENTS   0x40000000

◆ XKEYRAW

#define XKEYRAW   0x20000000

◆ VINTR

#define VINTR   0

◆ VQUIT

#define VQUIT   1

◆ VERASE

#define VERASE   2

◆ VKILL

#define VKILL   3

◆ VEOF

#define VEOF   4

◆ VTIME

#define VTIME   5

◆ VMIN

#define VMIN   6

◆ VSUSP

#define VSUSP   10

◆ TCGETS

#define TCGETS   0x5401

◆ TCSETS

#define TCSETS   0x5402

◆ TCSETSW

#define TCSETSW   0x5403

◆ TCSETSF

#define TCSETSF   0x5404

◆ TIOCSCTTY

#define TIOCSCTTY   0x540E

◆ TIOCGPGRP

#define TIOCGPGRP   0x540F

◆ TIOCSPGRP

#define TIOCSPGRP   0x5410

◆ TIOCGWINSZ

#define TIOCGWINSZ   0x5413

◆ TIOCSWINSZ

#define TIOCSWINSZ   0x5414

◆ TIOCGPTN

#define TIOCGPTN   0x80045430

◆ TIOCSPTLCK

#define TIOCSPTLCK   0x40045431

Function Documentation

◆ console_terminal_init()

void console_terminal_init ( uint32_t init_pid)

set up the console terminal: default settings, and init's session as the one it controls (with init's group in the foreground).

call once at boot, before the first process runs.

Parameters
init_pidthe pid init will have (its session and group id).