string.s: fix memcmp() for non-equal case
[neatlibc.git] / termios.c
blobb67a26a88e6a063c93de9fa59861abba6dc648e5
1 #include <errno.h>
2 #include <termios.h>
3 #include <sys/ioctl.h>
5 int tcgetattr(int fd, struct termios *term)
7 return ioctl(fd, TCGETS, term);
10 int tcsetattr(int fd, int actions, struct termios* term)
12 switch (actions) {
13 case TCSANOW:
14 return ioctl(fd, TCSETS , term);
15 case TCSADRAIN:
16 return ioctl(fd, TCSETSW, term);
17 case TCSAFLUSH:
18 return ioctl(fd, TCSETSF, term);
20 errno = EINVAL;
21 return -1;