blob: 5f17c04fc922eb77966816153a71630a8e4b57f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include "asm-generic/termbits-common.h"
#include <asm-generic/termbits.h>
#include <errno.h>
int cfsetospeed(struct termios *termios_p, speed_t speed)
{
if (speed & ~CBAUD) {
errno = EINVAL;
return -1;
}
termios_p->c_cflag &= ~CBAUD;
termios_p->c_cflag |= speed;
return 0;
}
|