4.115
Last change
on this file since 98b785e was
fab27e47,
checked in by Joel Sherrill <joel.sherrill@…>, on 06/07/10 at 18:37:16
|
2010-06-07 Joel Sherrill <joel.sherrill@…>
- libcsupport/src/tcflow.c, libcsupport/src/tcflush.c: Add switches
to detect bad input.
- libcsupport/src/tcsetpgrp.c: Fix typo.
|
-
Property mode set to
100644
|
File size:
952 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.com/license/LICENSE. |
---|
10 | * |
---|
11 | * $Id$ |
---|
12 | */ |
---|
13 | |
---|
14 | #if HAVE_CONFIG_H |
---|
15 | #include "config.h" |
---|
16 | #endif |
---|
17 | |
---|
18 | #include <rtems.h> |
---|
19 | #if defined(RTEMS_NEWLIB) |
---|
20 | |
---|
21 | #include <sys/types.h> |
---|
22 | #include <sys/stat.h> |
---|
23 | #include <errno.h> |
---|
24 | #include <termios.h> |
---|
25 | /* #include <sys/ioctl.h> */ |
---|
26 | |
---|
27 | #include <rtems/seterr.h> |
---|
28 | #include <rtems/libio.h> |
---|
29 | |
---|
30 | int tcflush ( |
---|
31 | int fd __attribute__((unused)), |
---|
32 | int queue |
---|
33 | ) |
---|
34 | { |
---|
35 | switch (queue) { |
---|
36 | case TCIFLUSH: |
---|
37 | case TCOFLUSH: |
---|
38 | case TCIOFLUSH: |
---|
39 | default: |
---|
40 | rtems_set_errno_and_return_minus_one( EINVAL ); |
---|
41 | } |
---|
42 | |
---|
43 | /* fd is not validated */ |
---|
44 | |
---|
45 | /* When this is supported, implement it here */ |
---|
46 | rtems_set_errno_and_return_minus_one( ENOTSUP ); |
---|
47 | return 0; |
---|
48 | } |
---|
49 | |
---|
50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.