source: trunk/minix/lib/posix/_tcsetattr.c@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 585 bytes
Line 
1/*
2posix/_tcsetattr.c
3
4Created: June 11, 1993 by Philip Homburg
5*/
6
7#define tcsetattr _tcsetattr
8#define ioctl _ioctl
9#include <errno.h>
10#include <termios.h>
11#include <sys/ioctl.h>
12#include <sys/types.h>
13
14int tcsetattr(fd, opt_actions, termios_p)
15int fd;
16int opt_actions;
17_CONST struct termios *termios_p;
18{
19 int request;
20
21 switch(opt_actions)
22 {
23 case TCSANOW: request = TCSETS; break;
24 case TCSADRAIN: request = TCSETSW; break;
25 case TCSAFLUSH: request = TCSETSF; break;
26 default: errno = EINVAL; return(-1);
27 };
28 return(ioctl(fd, request, (void *) termios_p));
29}
Note: See TracBrowser for help on using the repository browser.