musl/src/termios/tcsetattr.c

14 lines
243 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include <termios.h>
#include <sys/ioctl.h>
#include <string.h>
#include <errno.h>
int tcsetattr(int fd, int act, const struct termios *tio)
{
if (act < 0 || act > 2) {
errno = EINVAL;
return -1;
}
return ioctl(fd, TCSETS+act, tio);
}