repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
iconv: fix missing bounds checking for shift_jis decoding
[musl.git]
/
src
/
termios
/
tcsetattr.c
blob
94df18f91e1718b034303c32b8ee919808ac9f9c
1
#include <termios.h>
2
#include <sys/ioctl.h>
3
#include <errno.h>
4
5
int
tcsetattr
(
int
fd
,
int
act
,
const struct
termios
*
tio
)
6
{
7
if
(
act
<
0
||
act
>
2
) {
8
errno
=
EINVAL
;
9
return
-
1
;
10
}
11
return
ioctl
(
fd
,
TCSETS
+
act
,
tio
);
12
}