change log for rtems (2010-04-28)

rtems-vc at rtems.org rtems-vc at rtems.org
Wed Apr 28 15:11:21 UTC 2010


 *joel*:
2010-04-28	Joel Sherrill <joel.sherrill at oarcorp.com>

	* libcsupport/src/chdir.c: Check for NULL pointer.

M 1.2271  cpukit/ChangeLog
M   1.14  cpukit/libcsupport/src/chdir.c

diff -u rtems/cpukit/ChangeLog:1.2270 rtems/cpukit/ChangeLog:1.2271
--- rtems/cpukit/ChangeLog:1.2270	Sun Apr 25 21:43:30 2010
+++ rtems/cpukit/ChangeLog	Wed Apr 28 10:01:31 2010
@@ -1,3 +1,7 @@
+2010-04-28	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* libcsupport/src/chdir.c: Check for NULL pointer.
+
 2010-04-25	Joel Sherrill <joel.sherrilL at OARcorp.com>
 
 	* libfs/src/rfs/rtems-rfs-bitmaps-ut.c: Fix warning.

diff -u rtems/cpukit/libcsupport/src/chdir.c:1.13 rtems/cpukit/libcsupport/src/chdir.c:1.14
--- rtems/cpukit/libcsupport/src/chdir.c:1.13	Thu Jun 11 20:53:32 2009
+++ rtems/cpukit/libcsupport/src/chdir.c	Wed Apr 28 10:01:31 2010
@@ -1,7 +1,7 @@
 /*
  *  chdir() - POSIX 1003.1b - 5.2.1 - Change Current Working Directory
  *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2010.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -30,10 +30,12 @@
   rtems_filesystem_location_info_t  loc;
   int                               result;
 
+  if ( !pathname )
+    rtems_set_errno_and_return_minus_one( EFAULT );
+
   /*
    *  Get the node where we wish to go.
    */
-
   result = rtems_filesystem_evaluate_path(
     pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
   if ( result != 0 )
@@ -42,7 +44,6 @@
   /*
    * Verify you can change directory into this node.
    */
-
   if ( !loc.ops->node_type_h ) {
     rtems_filesystem_freenode( &loc );
     rtems_set_errno_and_return_minus_one( ENOTSUP );


 *joel*:
2010-04-28	Joel Sherrill <joel.sherrill at oarcorp.com>

	* psxfile01/test.c: Add check for errno on chdir(NULL).

M  1.261  testsuites/psxtests/ChangeLog
M   1.21  testsuites/psxtests/psxfile01/test.c

diff -u rtems/testsuites/psxtests/ChangeLog:1.260 rtems/testsuites/psxtests/ChangeLog:1.261
--- rtems/testsuites/psxtests/ChangeLog:1.260	Sun Apr 25 14:53:38 2010
+++ rtems/testsuites/psxtests/ChangeLog	Wed Apr 28 10:01:51 2010
@@ -1,3 +1,7 @@
+2010-04-28	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* psxfile01/test.c: Add check for errno on chdir(NULL).
+
 2010-04-25	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* psxrdwrv/test.c: Use SIZE_MAX not SSIZE_MAX.

diff -u rtems/testsuites/psxtests/psxfile01/test.c:1.20 rtems/testsuites/psxtests/psxfile01/test.c:1.21
--- rtems/testsuites/psxtests/psxfile01/test.c:1.20	Tue Dec  8 11:52:53 2009
+++ rtems/testsuites/psxtests/psxfile01/test.c	Wed Apr 28 10:01:51 2010
@@ -10,7 +10,7 @@
  *    /dev
  *    /dev/XXX   [where XXX includes at least console]
  *
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989-2010.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -220,6 +220,7 @@
   /* test rtems_filesystem_evaluate_path by sending NULL path */
   status = chdir( NULL );
   rtems_test_assert( status == -1 );
+  rtems_test_assert( errno == EFAULT );
 
   /*
    *  Now switch gears and exercise rmdir().



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100428/6bfe9677/attachment-0001.html>


More information about the vc mailing list