blob: a76e77a566e914b677289b0a61ade66378825552 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include <termios.h>
#include <syscall.h>
#include <asm-generic/ioctls.h>
#include <errno.h>
int tcsetattr(int fildes, int optional_actions, const struct termios *termios_p)
{
if (optional_actions < 0 || optional_actions > 2) {
errno = EINVAL;
return -1;
}
return syscall(ioctl, fildes, TCSETS + optional_actions, termios_p);
}
|