4.104.114.84.95
Last change
on this file since c7016198 was
3cad2919,
checked in by Joel Sherrill <joel.sherrill@…>, on 10/01/99 at 15:55:30
|
Addition of more functionality by Eric Norum to support GNU readline.
|
-
Property mode set to
100644
|
File size:
968 bytes
|
Line | |
---|
1 | /* |
---|
2 | * tcsetattr() - POSIX 1003.1b 7.2.1 - Get and Set State |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-1998. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * Copyright assigned to U.S. Government, 1994. |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in the file LICENSE in this distribution or at |
---|
10 | * http://www.OARcorp.com/rtems/license.html. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #include <rtems.h> |
---|
16 | #if defined(RTEMS_NEWLIB) |
---|
17 | |
---|
18 | #include <sys/types.h> |
---|
19 | #include <sys/stat.h> |
---|
20 | #include <errno.h> |
---|
21 | #include <termios.h> |
---|
22 | /* #include <sys/ioctl.h> */ |
---|
23 | |
---|
24 | int ioctl(); |
---|
25 | |
---|
26 | #include <rtems/libio.h> |
---|
27 | #include "libio_.h" |
---|
28 | |
---|
29 | int tcsetattr( |
---|
30 | int fd, |
---|
31 | int opt, |
---|
32 | struct termios *tp |
---|
33 | ) |
---|
34 | { |
---|
35 | switch (opt) { |
---|
36 | default: |
---|
37 | set_errno_and_return_minus_one( ENOTSUP ); |
---|
38 | |
---|
39 | case TCSADRAIN: |
---|
40 | if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) |
---|
41 | return -1; |
---|
42 | /* |
---|
43 | * Fall through to.... |
---|
44 | */ |
---|
45 | case TCSANOW: |
---|
46 | return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); |
---|
47 | } |
---|
48 | } |
---|
49 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.