| Updated: October 28, 2024 |
Set terminal properties from a termios structure
#include <sys/ioctl.h>
#define TIOCSETA _IOW('t', 20, struct termios) /* set termios struct */
#define TIOCSETAW _IOW('t', 21, struct termios) /* drain output, set */
#define TIOCSETAF _IOW('t', 22, struct termios) /* drn out, fls in, set */
| Argument | Value |
|---|---|
| fd | A file descriptor that you obtained by opening the device |
| request | TIOCSETA, TIOCSETAF, or TIOCSETAW |
| Additional argument | A pointer to a struct termios |
These commands change the current terminal control settings of a device:
They're also implemented as devctl() commands:
| ioctl() command | devctl() command |
|---|---|
| TIOCSETA | DCMD_CHR_TCSETATTR |
| TIOCSETAF | DCMD_CHR_TCSETATTRF |
| TIOCSETAW | DCMD_CHR_TCSETATTRD |
A termios structure.
None.