Move RTEMS-specific Termios API content

Remove obsolete support for OFILL, OFDEL, NLDLY, CRDLY, BSDLY, VTDLY,
and FFDLY which is not present on FreeBSD and not implemented in Linux.

Update #2833.
This commit is contained in:
Sebastian Huber
2017-06-07 12:57:39 +02:00
parent 64ecfc17b7
commit 93531e9b08
9 changed files with 19 additions and 118 deletions
+1 -81
View File
@@ -27,6 +27,7 @@
#include <bsp.h>
#include <rtems/shell.h>
#include <rtems/termiostypes.h>
#include <stdio.h>
#include <unistd.h>
@@ -131,87 +132,6 @@ void print_c_oflag( struct termios * tp )
if( tp->c_oflag & ONLRET )
printf( "ONLRET " );
if( tp->c_oflag & OFILL )
printf( "OFILL " );
if( tp->c_oflag & OFDEL )
printf( "OFDEL " );
switch( tp->c_oflag & NLDLY ) {
case NL0:
printf( "NL0 " );
break;
case NL1:
printf( "NL1 " );
break;
}
switch( tp->c_oflag & CRDLY ) {
case CR0:
printf( "CR0 " );
break;
case CR1:
printf( "CR1 " );
break;
case CR2:
printf( "CR2 " );
break;
case CR3:
printf( "CR3 " );
break;
}
switch( tp->c_oflag & TABDLY ) {
case TAB0:
printf( "TAB0 " );
break;
case TAB1:
printf( "TAB1 " );
break;
case TAB2:
printf( "TAB2 " );
break;
case TAB3:
printf( "TAB3 " );
break;
}
switch( tp->c_oflag & BSDLY ) {
case BS0:
printf( "BS0 " );
break;
case BS1:
printf( "BS1 " );
break;
}
switch( tp->c_oflag & VTDLY ) {
case VT0:
printf( "VT0 " );
break;
case VT1:
printf( "VT1 " );
break;
}
switch( tp->c_oflag & FFDLY ) {
case FF0:
printf( "FF0" );
break;
case FF1:
printf( "FF1" );
break;
}
printf( "\n" );
}
+1
View File
@@ -21,6 +21,7 @@
#include <unistd.h>
#include <termios.h>
#include <rtems/dumpbuf.h>
#include <rtems/termiostypes.h>
const char rtems_test_name[] = "TERMIOS 3";
+1
View File
@@ -21,6 +21,7 @@
#include <unistd.h>
#include <termios.h>
#include <rtems/dumpbuf.h>
#include <rtems/termiostypes.h>
const char rtems_test_name[] = "TERMIOS 5";
+3 -3
View File
@@ -848,7 +848,7 @@ static void test_opost(test_context *ctx)
static void test_xtabs(test_context *ctx)
{
tcflag_t oflags = OPOST | XTABS;
tcflag_t oflags = OPOST | OXTABS;
size_t i;
for (i = 0; i < DEVICE_COUNT; ++i) {
@@ -952,7 +952,7 @@ static void flush_task(rtems_task_argument arg)
static void test_write(test_context *ctx)
{
tcflag_t oflags = OPOST | ONLCR | XTABS;
tcflag_t oflags = OPOST | ONLCR | OXTABS;
rtems_status_code sc;
size_t i = INTERRUPT;
device_context *dev = &ctx->devices[i];
@@ -1031,7 +1031,7 @@ static void test_write(test_context *ctx)
buf[OUTPUT_BUFFER_SIZE - 1] = '\n';
rtems_test_assert(memcmp(dev->output_buf, buf, OUTPUT_BUFFER_SIZE) == 0);
/* Ensure that XTABS output expansion is taken into account */
/* Ensure that OXTABS output expansion is taken into account */
dev->tty->column = 0;
clear_output(ctx, i);