<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-12-14)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-12-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
* termios01/init.c: Update due to API changes. Fixed integer types.
Make functions static. Added const qualifier.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/ChangeLog.diff?r1=text&tr1=1.286&r2=text&tr2=1.287&diff_format=h">M</a></td><td width='1%'>1.287</td><td width='100%'>testsuites/libtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios01/init.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>testsuites/libtests/termios01/init.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.286 rtems/testsuites/libtests/ChangeLog:1.287
--- rtems/testsuites/libtests/ChangeLog:1.286 Tue Dec 13 06:11:10 2011
+++ rtems/testsuites/libtests/ChangeLog Wed Dec 14 06:58:20 2011
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2011-12-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * termios01/init.c: Update due to API changes. Fixed integer types.
+ Make functions static. Added const qualifier.
+
</font> 2011-12-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* math/init.c, mathf/init.c, mathl/init.c: Move configuration section.
<font color='#006600'>diff -u rtems/testsuites/libtests/termios01/init.c:1.15 rtems/testsuites/libtests/termios01/init.c:1.16
--- rtems/testsuites/libtests/termios01/init.c:1.15 Tue Feb 22 01:34:08 2011
+++ rtems/testsuites/libtests/termios01/init.c Wed Dec 14 06:58:21 2011
</font><font color='#997700'>@@ -27,20 +27,24 @@
</font> */
#include "termios_testdriver.h"
<font color='#880000'>-rtems_driver_address_table test_driver = TERMIOS_TEST_DRIVER_TABLE_ENTRY;
</font><font color='#000088'>+static const rtems_driver_address_table test_driver =
+ TERMIOS_TEST_DRIVER_TABLE_ENTRY;
</font>
/*
* Baud Rate Constant Mapping Entry
*/
typedef struct {
<font color='#880000'>- int constant;
</font><font color='#000088'>+ tcflag_t constant;
</font> rtems_termios_baud_t baud;
} termios_baud_test_r;
<font color='#000088'>+#define INVALID_CONSTANT ((tcflag_t) -2)
+
+#define INVALID_BAUD ((rtems_termios_baud_t) -2)
</font> /*
* Baud Rate Constant Mapping Table
*/
<font color='#880000'>-termios_baud_test_r baud_table[] = {
</font><font color='#000088'>+static const termios_baud_test_r baud_table[] = {
</font> { B0, 0 },
{ B50, 50 },
{ B75, 75 },
<font color='#997700'>@@ -61,81 +65,77 @@
</font> { B115200, 115200 },
{ B230400, 230400 },
{ B460800, 460800 },
<font color='#880000'>- { -1, -1 }
</font><font color='#000088'>+ { INVALID_CONSTANT, INVALID_BAUD }
</font> };
/*
* Character Size Constant Mapping Entry
*/
typedef struct {
<font color='#880000'>- int constant;
</font><font color='#000088'>+ tcflag_t constant;
</font> int bits;
} termios_character_size_test_r;
/*
* Character Size Constant Mapping Table
*/
<font color='#880000'>-termios_character_size_test_r char_size_table[] = {
</font><font color='#000088'>+static const termios_character_size_test_r char_size_table[] = {
</font> { CS5, 5 },
{ CS6, 6 },
{ CS7, 7 },
{ CS8, 8 },
<font color='#880000'>- { -1, -1 }
</font><font color='#000088'>+ { INVALID_CONSTANT, -1 }
</font> };
/*
* Parity Constant Mapping Entry
*/
typedef struct {
<font color='#880000'>- int constant;
</font><font color='#000088'>+ tcflag_t constant;
</font> const char *parity;
} termios_parity_test_r;
/*
* Parity Constant Mapping Table
*/
<font color='#880000'>-termios_parity_test_r parity_table[] = {
</font><font color='#000088'>+static const termios_parity_test_r parity_table[] = {
</font> { 0, "none" },
{ PARENB, "even" },
{ PARENB | PARODD, "odd" },
<font color='#880000'>- { -1, NULL }
</font><font color='#000088'>+ { INVALID_CONSTANT, NULL }
</font> };
/*
* Stop Bit Constant Mapping Entry
*/
typedef struct {
<font color='#880000'>- int constant;
- int stop;
</font><font color='#000088'>+ tcflag_t constant;
+ int stop;
</font> } termios_stop_bits_test_r;
/*
* Stop Bit Constant Mapping Table
*/
<font color='#880000'>-termios_stop_bits_test_r stop_bits_table[] = {
</font><font color='#000088'>+static const termios_stop_bits_test_r stop_bits_table[] = {
</font> { 0, 1 },
{ CSTOPB, 2 },
<font color='#880000'>- { -1, -1 }
</font><font color='#000088'>+ { INVALID_CONSTANT, -1 }
</font> };
/*
* Test converting baud rate into an index
*/
<font color='#880000'>-void test_termios_baud2index(void)
</font><font color='#000088'>+static void test_termios_baud2index(void)
</font> {
int i;
int index;
puts( "Test termios_baud2index..." );
puts( "termios_baud_to_index(-2) - NOT OK" );
<font color='#880000'>- i = rtems_termios_baud_to_index( -2 );
- rtems_test_assert( i == -1 );
-
- puts( "termios_baud_to_index(572) - NOT OK" );
- i = rtems_termios_baud_to_index( -2 );
</font><font color='#000088'>+ i = rtems_termios_baud_to_index( INVALID_CONSTANT );
</font> rtems_test_assert( i == -1 );
<font color='#880000'>- for (i=0 ; baud_table[i].constant != -1 ; i++ ) {
</font><font color='#000088'>+ for (i=0 ; baud_table[i].constant != INVALID_CONSTANT ; i++ ) {
</font> printf(
"termios_baud_to_index(B%" PRIdrtems_termios_baud_t ") - OK\n",
baud_table[i].baud
<font color='#997700'>@@ -151,24 +151,20 @@
</font> /*
* Test converting termios baud constant to baud number
*/
<font color='#880000'>-void test_termios_baud2number(void)
</font><font color='#000088'>+static void test_termios_baud2number(void)
</font> {
int i;
<font color='#880000'>- int number;
</font><font color='#000088'>+ rtems_termios_baud_t number;
</font>
puts(
"\n"
"Test termios_baud2number..."
);
puts( "termios_baud_to_number(-2) - NOT OK" );
<font color='#880000'>- i = rtems_termios_baud_to_number( -2 );
- rtems_test_assert( i == -1 );
</font><font color='#000088'>+ number = rtems_termios_baud_to_number( INVALID_CONSTANT );
+ rtems_test_assert( number == 0 );
</font>
<font color='#880000'>- puts( "termios_baud_to_number(572) - NOT OK" );
- i = rtems_termios_baud_to_number( -2 );
- rtems_test_assert( i == -1 );
-
- for (i=0 ; baud_table[i].constant != -1 ; i++ ) {
</font><font color='#000088'>+ for (i=0 ; baud_table[i].constant != INVALID_CONSTANT ; i++ ) {
</font> printf(
"termios_baud_to_number(B%" PRIdrtems_termios_baud_t ") - OK\n",
baud_table[i].baud
<font color='#997700'>@@ -176,7 +172,8 @@
</font> number = rtems_termios_baud_to_number( baud_table[i].constant );
if ( number != baud_table[i].baud ) {
printf(
<font color='#880000'>- "ERROR - returned %d should be %" PRIdrtems_termios_baud_t "\n",
</font><font color='#000088'>+ "ERROR - returned %" PRIdrtems_termios_baud_t
+ " should be %" PRIdrtems_termios_baud_t "\n",
</font> number,
baud_table[i].baud
);
<font color='#997700'>@@ -188,24 +185,20 @@
</font> /*
* Test converting baud number to termios baud constant
*/
<font color='#880000'>-void test_termios_number_to_baud(void)
</font><font color='#000088'>+static void test_termios_number_to_baud(void)
</font> {
int i;
<font color='#880000'>- int termios_baud;
</font><font color='#000088'>+ tcflag_t termios_baud;
</font>
puts(
"\n"
"Test termios_number_to_baud..."
);
puts( "termios_number_to_baud(-2) - NOT OK" );
<font color='#880000'>- i = rtems_termios_number_to_baud( -2 );
- rtems_test_assert( i == -1 );
</font><font color='#000088'>+ termios_baud = rtems_termios_number_to_baud( INVALID_BAUD );
+ rtems_test_assert( termios_baud == 0 );
</font>
<font color='#880000'>- puts( "termios_number_to_baud(572) - NOT OK" );
- i = rtems_termios_number_to_baud( -2 );
- rtems_test_assert( i == -1 );
-
- for (i=0 ; baud_table[i].constant != -1 ; i++ ) {
</font><font color='#000088'>+ for (i=0 ; baud_table[i].constant != INVALID_CONSTANT ; i++ ) {
</font> printf(
"termios_number_to_baud(B%" PRIdrtems_termios_baud_t ") - OK\n",
baud_table[i].baud
<font color='#997700'>@@ -225,7 +218,7 @@
</font> /*
* Test all the baud rate options
*/
<font color='#880000'>-void test_termios_set_baud(
</font><font color='#000088'>+static void test_termios_set_baud(
</font> int test
)
{
<font color='#997700'>@@ -234,14 +227,16 @@
</font> struct termios attr;
puts( "Test termios setting device baud rate..." );
<font color='#880000'>- for (i=0 ; baud_table[i].constant != -1 ; i++ ) {
</font><font color='#000088'>+ for (i=0 ; baud_table[i].constant != INVALID_CONSTANT ; i++ ) {
+ tcflag_t cbaud = CBAUD;
+
</font> sc = tcgetattr( test, &attr );
if ( sc != 0 ) {
printf( "ERROR - return %d\n", sc );
rtems_test_exit(0);
}
<font color='#880000'>- attr.c_cflag &= ~CBAUD;
</font><font color='#000088'>+ attr.c_cflag &= ~cbaud;
</font> attr.c_cflag |= baud_table[i].constant;
printf(
<font color='#997700'>@@ -269,7 +264,7 @@
</font> /*
* Test all the character size options
*/
<font color='#880000'>-void test_termios_set_charsize(
</font><font color='#000088'>+static void test_termios_set_charsize(
</font> int test
)
{
<font color='#997700'>@@ -281,14 +276,16 @@
</font> "\n"
"Test termios setting device character size ..."
);
<font color='#880000'>- for (i=0 ; char_size_table[i].constant != -1 ; i++ ) {
</font><font color='#000088'>+ for (i=0 ; char_size_table[i].constant != INVALID_CONSTANT ; i++ ) {
+ tcflag_t csize = CSIZE;
+
</font> sc = tcgetattr( test, &attr );
if ( sc != 0 ) {
printf( "ERROR - return %d\n", sc );
rtems_test_exit(0);
}
<font color='#880000'>- attr.c_cflag &= ~CSIZE;
</font><font color='#000088'>+ attr.c_cflag &= ~csize;
</font> attr.c_cflag |= char_size_table[i].constant;
printf( "tcsetattr(TCSANOW, CS%d) - OK\n", char_size_table[i].bits );
<font color='#997700'>@@ -310,7 +307,7 @@
</font> /*
* Test all the parity options
*/
<font color='#880000'>-void test_termios_set_parity(
</font><font color='#000088'>+static void test_termios_set_parity(
</font> int test
)
{
<font color='#997700'>@@ -322,14 +319,16 @@
</font> "\n"
"Test termios setting device parity ..."
);
<font color='#880000'>- for (i=0 ; parity_table[i].constant != -1 ; i++ ) {
</font><font color='#000088'>+ for (i=0 ; parity_table[i].constant != INVALID_CONSTANT ; i++ ) {
+ tcflag_t par = PARENB | PARODD;
+
</font> sc = tcgetattr( test, &attr );
if ( sc != 0 ) {
printf( "ERROR - return %d\n", sc );
rtems_test_exit(0);
}
<font color='#880000'>- attr.c_cflag &= ~(PARENB|PARODD);
</font><font color='#000088'>+ attr.c_cflag &= ~par;
</font> attr.c_cflag |= parity_table[i].constant;
printf( "tcsetattr(TCSANOW, %s) - OK\n", parity_table[i].parity );
<font color='#997700'>@@ -351,7 +350,7 @@
</font> /*
* Test all the stop bit options
*/
<font color='#880000'>-void test_termios_set_stop_bits(
</font><font color='#000088'>+static void test_termios_set_stop_bits(
</font> int test
)
{
<font color='#997700'>@@ -363,14 +362,16 @@
</font> "\n"
"Test termios setting device character size ..."
);
<font color='#880000'>- for (i=0 ; stop_bits_table[i].constant != -1 ; i++ ) {
</font><font color='#000088'>+ for (i=0 ; stop_bits_table[i].constant != INVALID_CONSTANT ; i++ ) {
+ tcflag_t cstopb = CSTOPB;
+
</font> sc = tcgetattr( test, &attr );
if ( sc != 0 ) {
printf( "ERROR - return %d\n", sc );
rtems_test_exit(0);
}
<font color='#880000'>- attr.c_cflag &= ~CSTOPB;
</font><font color='#000088'>+ attr.c_cflag &= ~cstopb;
</font> attr.c_cflag |= stop_bits_table[i].constant;
printf( "tcsetattr(TCSANOW, %d bit%s) - OK\n",
<font color='#997700'>@@ -392,7 +393,7 @@
</font> }
}
<font color='#880000'>-void test_termios_cfoutspeed(void)
</font><font color='#000088'>+static void test_termios_cfoutspeed(void)
</font> {
int i;
int sc;
<font color='#997700'>@@ -407,7 +408,7 @@
</font> rtems_test_assert( sc == -1 );
rtems_test_assert( errno == EINVAL );
<font color='#880000'>- for (i=0 ; baud_table[i].constant != -1 ; i++ ) {
</font><font color='#000088'>+ for (i=0 ; baud_table[i].constant != INVALID_CONSTANT ; i++ ) {
</font> memset( &term, '\0', sizeof(term) );
printf(
"cfsetospeed(B%" PRIdrtems_termios_baud_t ") - OK\n",
<font color='#997700'>@@ -424,7 +425,7 @@
</font> }
}
<font color='#880000'>-void test_termios_cfinspeed(void)
</font><font color='#000088'>+static void test_termios_cfinspeed(void)
</font> {
int i;
int sc;
<font color='#997700'>@@ -439,7 +440,7 @@
</font> rtems_test_assert( sc == -1 );
rtems_test_assert( errno == EINVAL );
<font color='#880000'>- for (i=0 ; baud_table[i].constant != -1 ; i++ ) {
</font><font color='#000088'>+ for (i=0 ; baud_table[i].constant != INVALID_CONSTANT ; i++ ) {
</font> memset( &term, '\0', sizeof(term) );
printf(
"cfsetispeed(B%" PRIdrtems_termios_baud_t ") - OK\n",
<font color='#997700'>@@ -457,7 +458,7 @@
</font> }
}
<font color='#880000'>-rtems_task Init(
</font><font color='#000088'>+static rtems_task Init(
</font> rtems_task_argument ignored
)
{
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>