projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
remove useless __yield alias for sched_yield
[oweals/musl.git]
/
src
/
termios
/
cfsetospeed.c
1
#include <termios.h>
2
#include <sys/ioctl.h>
3
#include <errno.h>
4
#include "libc.h"
5
6
int cfsetospeed(struct termios *tio, speed_t speed)
7
{
8
if (speed & ~CBAUD) {
9
errno = EINVAL;
10
return -1;
11
}
12
tio->c_cflag &= ~CBAUD;
13
tio->c_cflag |= speed;
14
return 0;
15
}
16
17
int cfsetispeed(struct termios *tio, speed_t speed)
18
{
19
return speed ? cfsetospeed(tio, speed) : 0;
20
}
21
22
weak_alias(cfsetospeed, cfsetspeed);