File:
[DVB] /
dietlibc /
lib /
tcflow.c
Revision
1.2:
download - view:
text,
annotated -
select for diffs
Wed Aug 15 16:39:30 2001 UTC (22 years, 10 months ago) by
fefe
Branches:
MAIN
CVS tags:
finnland_test_200301,
branch_rc14_fieldtest_finnland,
branch_rc13_fieldtest_finnland,
branch_rc12_fieldtest_finnland,
branch_rc10_fieldtest_finnland,
RELEASE_finnland_200301_1,
RC12_FIELDTEST_FINNLAND,
RC10_FIELDTEST_FINNLAND,
HEAD
a few more cleanups and tcflow and tcsetattr have been optimized by
Frank Klemm.
#include "dietfeatures.h"
#include <errno.h>
#include <termios.h>
#include <sys/ioctl.h>
int tcflow ( int fd, int action )
{
#if TCOOFF==0 && TCOON==1 && TCIOFF==2 && TCION==3
if ( (unsigned int)action < 4u )
return ioctl ( fd, TCXONC, action );
errno = EINVAL;
return -1;
#else
int arg = 0;
switch (action) {
case TCION:
arg++;
case TCIOFF:
arg++;
case TCOON:
arg++;
case TCOOFF:
return ioctl ( fd, TCXONC, arg );
default:
errno = EINVAL;
return -1;
}
#endif
}
LinuxTV legacy CVS <linuxtv.org/cvs>