blob: dcaacc9278473764c8a356b2f105a46a6213d813 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#if 0
#include <termios.h>
#include <errno.h>
#include "_termios.h"
int tcsetattr(int fildes, int optional_actions, struct termios *termios_p)
{
int ret = -1;
struct kernel_termios kt;
utok(kt, *termios_p);
switch (optional_actions) {
case TCSANOW:
ret = ioctl(fildes, TCSETS, &kt);
break;
case TCSADRAIN:
ret = ioctl(fildes, TCSETSW, &kt);
break;
case TCSAFLUSH:
ret = ioctl(fildes, TCSETSF, &kt);
break;
default:
errno = EINVAL;
return -1;
}
ktou(*termios_p, kt);
return ret;
}
/*
POSIX(1)
*/
#endif
|