forked from Imagelibrary/rtems
2010-06-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/tcflow.c, libcsupport/src/tcflush.c: Add switches to detect bad input. * libcsupport/src/tcsetpgrp.c: Fix typo.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2010-06-07 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* libcsupport/src/tcflow.c, libcsupport/src/tcflush.c: Add switches
|
||||||
|
to detect bad input.
|
||||||
|
* libcsupport/src/tcsetpgrp.c: Fix typo.
|
||||||
|
|
||||||
2010-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
2010-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
* libcsupport/include/rtems/libio_.h: Declare
|
* libcsupport/include/rtems/libio_.h: Declare
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions
|
* tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-1999.
|
* COPYRIGHT (c) 1989-2010.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -18,12 +18,27 @@
|
|||||||
#if defined(RTEMS_NEWLIB)
|
#if defined(RTEMS_NEWLIB)
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <rtems/seterr.h>
|
||||||
|
|
||||||
int tcflow (
|
int tcflow (
|
||||||
int fd __attribute__((unused)),
|
int fd __attribute__((unused)),
|
||||||
int action __attribute__((unused)))
|
int action
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return 0;
|
switch (action) {
|
||||||
|
case TCOOFF:
|
||||||
|
case TCOON:
|
||||||
|
case TCIOFF:
|
||||||
|
case TCION:
|
||||||
|
default:
|
||||||
|
rtems_set_errno_and_return_minus_one( EINVAL );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fd is not validated */
|
||||||
|
|
||||||
|
/* When this is supported, implement it here */
|
||||||
|
rtems_set_errno_and_return_minus_one( ENOTSUP );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* tcflush() - POSIX 1003.1b 7.2.2 - Line Control Functions
|
* tcflush() - POSIX 1003.1b 7.2.2 - Line Control Functions
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-1999.
|
* COPYRIGHT (c) 1989-2010.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -24,12 +24,26 @@
|
|||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
/* #include <sys/ioctl.h> */
|
/* #include <sys/ioctl.h> */
|
||||||
|
|
||||||
|
#include <rtems/seterr.h>
|
||||||
#include <rtems/libio.h>
|
#include <rtems/libio.h>
|
||||||
|
|
||||||
int tcflush (
|
int tcflush (
|
||||||
int fd __attribute__((unused)),
|
int fd __attribute__((unused)),
|
||||||
int queue __attribute__((unused)) )
|
int queue
|
||||||
|
)
|
||||||
{
|
{
|
||||||
|
switch (queue) {
|
||||||
|
case TCIFLUSH:
|
||||||
|
case TCOFLUSH:
|
||||||
|
case TCIOFLUSH:
|
||||||
|
default:
|
||||||
|
rtems_set_errno_and_return_minus_one( EINVAL );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fd is not validated */
|
||||||
|
|
||||||
|
/* When this is supported, implement it here */
|
||||||
|
rtems_set_errno_and_return_minus_one( ENOTSUP );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* tcsetprgrp() - POSIX 1003.1b 7.2.4 - Set Foreground Process Group ID
|
* tcsetprgrp() - POSIX 1003.1b 7.2.4 - Set Foreground Process Group ID
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-1999.
|
* COPYRIGHT (c) 1989-2010.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include <rtems/libio.h>
|
#include <rtems/libio.h>
|
||||||
|
|
||||||
int tcsetprgrp(
|
int tcsetpgrp(
|
||||||
int fd __attribute__((unused)),
|
int fd __attribute__((unused)),
|
||||||
pid_t pid __attribute__((unused)) )
|
pid_t pid __attribute__((unused)) )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user