5
Last change
on this file since 8f808c1 was
1c6926c1,
checked in by Kevin Kirspel <kevin-kirspel@…>, on 03/21/17 at 19:39:48
|
termios: Synchronize with latest FreeBSD headers
Adding modified FreeBSD headers to synchronize RTEMS termios with
FreeBSD. Modify termios to support dedicated input and output baud for
termios structure. Updated BSPs to use dedicated input and output baud
in termios structure. Updated tools to use dedicated input and output
baud in termios structure. Updated termios testsuites to use dedicated
input and output baud in termios structure.
Close #2897.
|
-
Property mode set to
100644
|
File size:
850 bytes
|
Line | |
---|
1 | /* |
---|
2 | * tcflush() - POSIX 1003.1b 7.2.2 - Line Control Functions |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-2010. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.org/license/LICENSE. |
---|
10 | */ |
---|
11 | |
---|
12 | #if HAVE_CONFIG_H |
---|
13 | #include "config.h" |
---|
14 | #endif |
---|
15 | |
---|
16 | #include <sys/fcntl.h> |
---|
17 | #include <termios.h> |
---|
18 | #include <stdint.h> |
---|
19 | #include <sys/ioccom.h> |
---|
20 | #include <rtems/libio.h> |
---|
21 | #include <rtems/libio_.h> |
---|
22 | #include <rtems/seterr.h> |
---|
23 | |
---|
24 | int tcflush( int fd, int which ) |
---|
25 | { |
---|
26 | int com; |
---|
27 | |
---|
28 | switch (which) { |
---|
29 | case TCIFLUSH: |
---|
30 | com = FREAD; |
---|
31 | break; |
---|
32 | case TCOFLUSH: |
---|
33 | com = FWRITE; |
---|
34 | break; |
---|
35 | case TCIOFLUSH: |
---|
36 | com = FREAD | FWRITE; |
---|
37 | break; |
---|
38 | default: |
---|
39 | rtems_set_errno_and_return_minus_one( EINVAL ); |
---|
40 | } |
---|
41 | return ioctl( fd, TIOCFLUSH, &com ); |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.