<!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-05-13)</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-05-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libmisc/devnull/devzero.c, libmisc/devnull/devzero.h: New files.
* libmisc/Makefile.am, Makefile.am, preinstall.am: Reflect changes
above.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/Makefile.am.diff?r1=text&tr1=1.106&r2=text&tr2=1.107&diff_format=h">M</a></td><td width='1%'>1.107</td><td width='100%'>cpukit/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/Makefile.am.diff?r1=text&tr1=1.89&r2=text&tr2=1.90&diff_format=h">M</a></td><td width='1%'>1.90</td><td width='100%'>cpukit/libmisc/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/devnull/devzero.h?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">cpukit/libmisc/devnull/devzero.h</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/devnull/devzero.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">cpukit/libmisc/devnull/devzero.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/preinstall.am.diff?r1=text&tr1=1.50&r2=text&tr2=1.51&diff_format=h">M</a></td><td width='1%'>1.51</td><td width='100%'>cpukit/preinstall.am</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/Makefile.am:1.106 rtems/cpukit/Makefile.am:1.107
--- rtems/cpukit/Makefile.am:1.106 Thu Mar 24 06:21:58 2011
+++ rtems/cpukit/Makefile.am Fri May 13 08:46:43 2011
</font><font color='#997700'>@@ -140,7 +140,8 @@
</font> include_rtems_HEADERS += libmisc/cpuuse/cpuuse.h
## devnull
<font color='#880000'>-include_rtems_HEADERS += libmisc/devnull/devnull.h
</font><font color='#000088'>+include_rtems_HEADERS += libmisc/devnull/devnull.h \
+ libmisc/devnull/devzero.h
</font>
## dumpbuf
include_rtems_HEADERS += libmisc/dumpbuf/dumpbuf.h
<font color='#006600'>diff -u rtems/cpukit/libmisc/Makefile.am:1.89 rtems/cpukit/libmisc/Makefile.am:1.90
--- rtems/cpukit/libmisc/Makefile.am:1.89 Mon Mar 14 09:56:07 2011
+++ rtems/cpukit/libmisc/Makefile.am Fri May 13 08:46:43 2011
</font><font color='#997700'>@@ -30,7 +30,8 @@
</font>
## devnull
noinst_LIBRARIES += libdevnull.a
<font color='#880000'>-libdevnull_a_SOURCES = devnull/devnull.c devnull/devnull.h
</font><font color='#000088'>+libdevnull_a_SOURCES = devnull/devnull.c devnull/devnull.h \
+ devnull/devzero.c devnull/devzero.h
</font>
## dummy
EXTRA_DIST += dummy/README
<font color='#006600'>diff -u /dev/null rtems/cpukit/libmisc/devnull/devzero.h:1.1
--- /dev/null Fri May 13 09:12:08 2011
+++ rtems/cpukit/libmisc/devnull/devzero.h Fri May 13 08:46:43 2011
</font><font color='#997700'>@@ -0,0 +1,78 @@
</font><font color='#000088'>+/*
+ * Copyright (c) 2011 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifndef _RTEMS_DEVZERO_H
+#define _RTEMS_DEVZERO_H
+
+#include <rtems/io.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define DEVZERO_DEVICE_NAME "/dev/zero"
+
+#define DEVZERO_DRIVER_TABLE_ENTRY \
+ { \
+ dev_zero_initialize, \
+ dev_zero_open, \
+ dev_zero_close, \
+ dev_zero_read, \
+ dev_zero_write, \
+ dev_zero_control \
+ }
+
+rtems_device_driver dev_zero_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver dev_zero_open(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver dev_zero_close(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver dev_zero_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver dev_zero_write(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver dev_zero_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _RTEMS_DEVZERO_H */
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/libmisc/devnull/devzero.c:1.1
--- /dev/null Fri May 13 09:12:08 2011
+++ rtems/cpukit/libmisc/devnull/devzero.c Fri May 13 08:46:42 2011
</font><font color='#997700'>@@ -0,0 +1,88 @@
</font><font color='#000088'>+/*
+ * Copyright (c) 2011 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/devzero.h>
+
+#include <string.h>
+
+#include <rtems/libio.h>
+
+rtems_device_driver dev_zero_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *arg __attribute__((unused))
+)
+{
+ return rtems_io_register_name(DEVZERO_DEVICE_NAME, major, 0);
+}
+
+rtems_device_driver dev_zero_open(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *arg __attribute__((unused))
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver dev_zero_close(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *arg __attribute__((unused))
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver dev_zero_read(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *arg __attribute__((unused))
+)
+{
+ rtems_libio_rw_args_t *rw = arg;
+
+ rw->bytes_moved = rw->count;
+ memset(rw->buffer, 0, rw->count);
+
+ return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver dev_zero_write(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *arg
+)
+{
+ rtems_libio_rw_args_t *rw = arg;
+
+ rw->bytes_moved = rw->count;
+
+ return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver dev_zero_control(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *arg __attribute__((unused))
+)
+{
+ return RTEMS_IO_ERROR;
+}
</font>
<font color='#006600'>diff -u rtems/cpukit/preinstall.am:1.50 rtems/cpukit/preinstall.am:1.51
--- rtems/cpukit/preinstall.am:1.50 Thu Mar 24 06:22:08 2011
+++ rtems/cpukit/preinstall.am Fri May 13 08:46:43 2011
</font><font color='#997700'>@@ -309,6 +309,10 @@
</font> $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/devnull.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/devnull.h
<font color='#000088'>+$(PROJECT_INCLUDE)/rtems/devzero.h: libmisc/devnull/devzero.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/devzero.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/devzero.h
+
</font> $(PROJECT_INCLUDE)/rtems/dumpbuf.h: libmisc/dumpbuf/dumpbuf.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/dumpbuf.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/dumpbuf.h
</pre>
<p> </p>
<a name='cs2'></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-05-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
* sapi/include/confdefs.h: Added "/dev/zero" driver.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2820&r2=text&tr2=1.2821&diff_format=h">M</a></td><td width='1%'>1.2821</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/include/confdefs.h.diff?r1=text&tr1=1.163&r2=text&tr2=1.164&diff_format=h">M</a></td><td width='1%'>1.164</td><td width='100%'>cpukit/sapi/include/confdefs.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2820 rtems/cpukit/ChangeLog:1.2821
--- rtems/cpukit/ChangeLog:1.2820 Thu May 12 08:54:29 2011
+++ rtems/cpukit/ChangeLog Fri May 13 08:49:15 2011
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2011-05-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libmisc/devnull/devzero.c, libmisc/devnull/devzero.h: New files.
+ * libmisc/Makefile.am, Makefile.am, preinstall.am: Reflect changes
+ above.
+ * sapi/include/confdefs.h: Added "/dev/zero" driver.
+
</font> 2011-05-12 Joel Sherrill <joel.sherrilL@OARcorp.com>
* score/include/rtems/score/schedulersimple.h,
<font color='#006600'>diff -u rtems/cpukit/sapi/include/confdefs.h:1.163 rtems/cpukit/sapi/include/confdefs.h:1.164
--- rtems/cpukit/sapi/include/confdefs.h:1.163 Mon Apr 11 12:23:05 2011
+++ rtems/cpukit/sapi/include/confdefs.h Fri May 13 08:49:16 2011
</font><font color='#997700'>@@ -971,6 +971,10 @@
</font> #include <rtems/devnull.h>
#endif
<font color='#000088'>+#ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
+ #include <rtems/devzero.h>
+#endif
+
</font> #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
/* the ide driver needs the ATA driver */
#ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
<font color='#997700'>@@ -1008,6 +1012,9 @@
</font> #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
DEVNULL_DRIVER_TABLE_ENTRY,
#endif
<font color='#000088'>+ #ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
+ DEVZERO_DRIVER_TABLE_ENTRY,
+ #endif
</font> #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
IDE_CONTROLLER_DRIVER_TABLE_ENTRY,
#endif
<font color='#997700'>@@ -1026,6 +1033,7 @@
</font> !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
!defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \
!defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) && \
<font color='#000088'>+ !defined(CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER) && \
</font> !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) && \
!defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) && \
!defined(CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER) && \
</pre>
<p> </p>
<a name='cs3'></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-05-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
* sp21/init.c, sp21/sp21.doc sp21/sp21.scn: New test cases.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/ChangeLog.diff?r1=text&tr1=1.450&r2=text&tr2=1.451&diff_format=h">M</a></td><td width='1%'>1.451</td><td width='100%'>testsuites/sptests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/sp21/init.c.diff?r1=text&tr1=1.13&r2=text&tr2=1.14&diff_format=h">M</a></td><td width='1%'>1.14</td><td width='100%'>testsuites/sptests/sp21/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/sp21/sp21.doc.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>testsuites/sptests/sp21/sp21.doc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/sp21/sp21.scn.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>testsuites/sptests/sp21/sp21.scn</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/sptests/ChangeLog:1.450 rtems/testsuites/sptests/ChangeLog:1.451
--- rtems/testsuites/sptests/ChangeLog:1.450 Fri May 6 12:29:35 2011
+++ rtems/testsuites/sptests/ChangeLog Fri May 13 08:50:51 2011
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2011-05-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * sp21/init.c, sp21/sp21.doc sp21/sp21.scn: New test cases.
+
</font> 2011-05-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp39/init.c: Fix tests broken in warning pass.
<font color='#006600'>diff -u rtems/testsuites/sptests/sp21/init.c:1.13 rtems/testsuites/sptests/sp21/init.c:1.14
--- rtems/testsuites/sptests/sp21/init.c:1.13 Tue Feb 22 01:36:59 2011
+++ rtems/testsuites/sptests/sp21/init.c Fri May 13 08:50:51 2011
</font><font color='#997700'>@@ -15,12 +15,14 @@
</font>
#include <tmacros.h>
#include <rtems/devnull.h>
<font color='#880000'>-
</font><font color='#000088'>+#include <rtems/devzero.h>
+#include <rtems/libio.h>
</font>
#define PRIurtems_device_major_number PRIu32
#define STUB_DRIVER_MAJOR 0x2
<font color='#880000'>-#define NO_DRIVER_MAJOR 0x3
</font><font color='#000088'>+#define ZERO_DRIVER_MAJOR 0x3
+#define NO_DRIVER_MAJOR 0x4
</font> #define INVALID_DRIVER_MAJOR \
(rtems_configuration_get_number_of_device_drivers() + 1)
<font color='#997700'>@@ -204,6 +206,45 @@
</font> directive_failed( sc, "lookup /dev/null" );
}
<font color='#000088'>+void do_test_zero_driver(void)
+{
+ rtems_status_code sc = RTEMS_SUCCESSFUL;
+ char in = 'I';
+ rtems_libio_rw_args_t rw_in = {
+ .buffer = &in,
+ .count = sizeof(in)
+ };
+ char out = 'O';
+ rtems_libio_rw_args_t rw_out = {
+ .buffer = &out,
+ .count = sizeof(out)
+ };
+
+ puts( "----- TESTING THE ZERO DRIVER CHECKS -----" );
+
+ sc = rtems_io_initialize( ZERO_DRIVER_MAJOR, 0, NULL );
+ rtems_test_assert( sc == RTEMS_TOO_MANY );
+
+ sc = rtems_io_open( ZERO_DRIVER_MAJOR, 0, NULL );
+ rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+
+ sc = rtems_io_close( ZERO_DRIVER_MAJOR, 0, NULL );
+ rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+
+ sc = rtems_io_read( ZERO_DRIVER_MAJOR, 0, &rw_in );
+ rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+ rtems_test_assert( in == 0 );
+ rtems_test_assert( rw_in.bytes_moved == sizeof(in) );
+
+ sc = rtems_io_write( ZERO_DRIVER_MAJOR, 0, &rw_out );
+ rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+ rtems_test_assert( out == 'O' );
+ rtems_test_assert( rw_out.bytes_moved == sizeof(out) );
+
+ sc = rtems_io_control( ZERO_DRIVER_MAJOR, 0, NULL );
+ rtems_test_assert( sc == RTEMS_IO_ERROR );
+}
+
</font> rtems_task Init(
rtems_task_argument argument
)
<font color='#997700'>@@ -214,6 +255,8 @@
</font>
do_test_io_lookup_name();
<font color='#000088'>+ do_test_zero_driver();
+
</font> puts( "*** END OF TEST 21 ***" );
rtems_test_exit( 0 );
}
<font color='#997700'>@@ -223,6 +266,7 @@
</font> #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
<font color='#000088'>+#define CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
</font> #define CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
<font color='#006600'>diff -u rtems/testsuites/sptests/sp21/sp21.doc:1.7 rtems/testsuites/sptests/sp21/sp21.doc:1.8
--- rtems/testsuites/sptests/sp21/sp21.doc:1.7 Thu Sep 4 13:53:48 2003
+++ rtems/testsuites/sptests/sp21/sp21.doc Fri May 13 08:50:51 2011
</font><font color='#997700'>@@ -25,3 +25,5 @@
</font>
b. Verifies all I/O manager directives call and return from the driver
entry points in the driver address table.
<font color='#000088'>+
+ c. Check that zero driver works.
</font>
<font color='#006600'>diff -u rtems/testsuites/sptests/sp21/sp21.scn:1.4 rtems/testsuites/sptests/sp21/sp21.scn:1.5
--- rtems/testsuites/sptests/sp21/sp21.scn:1.4 Tue Jul 6 17:56:48 2010
+++ rtems/testsuites/sptests/sp21/sp21.scn Fri May 13 08:50:51 2011
</font><font color='#997700'>@@ -28,4 +28,5 @@
</font> rtems_io_lookup_name( "", &info ) - RTEMS_UNSATISFIED
rtems_io_lookup_name( "/dev", &info ) - RTEMS_UNSATISFIED
rtems_io_lookup_name( "/dev/null", &info ) - RTEMS_SUCCESSFUL
<font color='#000088'>+----- TESTING THE ZERO DRIVER CHECKS -----
</font> *** END OF TEST 21 ***
</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>