blob: b3747f84390af81459f6b1e022de495efde3f849 (
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
40
41
42
43
44
|
#if 0
#include <termios.h>
#include <errno.h>
#include "_assert.h"
int cfsetispeed(struct termios *termios_p, speed_t speed)
{
ASSERT_NONNULL(termios_p);
switch (speed) {
case B0:
case B50:
case B75:
case B110:
case B134:
case B150:
case B200:
case B300:
case B600:
case B1200:
case B1800:
case B2400:
case B4800:
case B9600:
case B19200:
case B38400:
termios_p->c_iflag &= ~B38400;
termios_p->c_iflag |= speed;
return 0;
default:
break;
}
errno = EINVAL;
return -1;
}
/*
POSIX(1)
*/
#endif
|