change log for rtems (2010-07-22)

rtems-vc at rtems.org rtems-vc at rtems.org
Fri Jul 23 01:10:32 UTC 2010


 *joel*:
2010-07-22	Joel Sherrill <joel.sherrill at oarcorp.com>

	PR 1627/testing
	* libfs/src/devfs/devstat.c:

M 1.2516  cpukit/ChangeLog
M    1.3  cpukit/libfs/src/devfs/devstat.c

diff -u rtems/cpukit/ChangeLog:1.2515 rtems/cpukit/ChangeLog:1.2516
--- rtems/cpukit/ChangeLog:1.2515	Fri Jul 16 04:24:51 2010
+++ rtems/cpukit/ChangeLog	Thu Jul 22 19:11:32 2010
@@ -1,3 +1,8 @@
+2010-07-22	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	PR 1627/testing
+	* libfs/src/devfs/devstat.c:
+
 2010-07-16	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
 	* libcsupport/src/link.c: Do not overwrite errno with return status.

diff -u rtems/cpukit/libfs/src/devfs/devstat.c:1.2 rtems/cpukit/libfs/src/devfs/devstat.c:1.3
--- rtems/cpukit/libfs/src/devfs/devstat.c:1.2	Thu Jun 11 20:53:33 2009
+++ rtems/cpukit/libfs/src/devfs/devstat.c	Thu Jul 22 19:11:32 2010
@@ -27,13 +27,19 @@
   rtems_device_name_t *the_dev;
 
   the_dev = (rtems_device_name_t *)loc->node_access;
-  if (!the_dev)
-    rtems_set_errno_and_return_minus_one( EFAULT );
 
-  buf->st_rdev  = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
+  /*
+   *  stat() invokes devFS_evaluate_path() which checks that node_access
+   *  is not NULL.  So this should NEVER be NULL unless someone breaks
+   *  other code in this filesystem.
+   */
+  #if defined(RTEMS_DEBUG)
+    if (!the_dev)
+      rtems_set_errno_and_return_minus_one( EFAULT );
+  #endif 
 
+  buf->st_rdev  = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
   buf->st_mode = the_dev->mode;
-
   return 0;
 }
 



--

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/20100722/6059ba5e/attachment-0001.html>


More information about the vc mailing list