summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-26 19:57:19 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-26 19:57:19 +0000
commit030ab087ef643174b48931bae92bad1f7af4a39c (patch)
treee9f78383e4b166b6aa9468baa003cf0d8a256a91 /cpukit
parent2010-08-26 Bharath Suri <bharath.s.jois@gmail.com> (diff)
downloadrtems-030ab087ef643174b48931bae92bad1f7af4a39c.tar.bz2
2010-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/eval.c: Make some filesystem implementation correctness checks conditional on RTEMS_DEBUG.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/libcsupport/src/eval.c40
2 files changed, 27 insertions, 18 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 6944eb1d5d..94afe0c199 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libcsupport/src/eval.c: Make some filesystem implementation
+ correctness checks conditional on RTEMS_DEBUG.
+
2010-08-26 Chris Johns <chrisj@rtems.org>
* libfs/src/defaults/default_evaluate_link.c: Remove assignment.
diff --git a/cpukit/libcsupport/src/eval.c b/cpukit/libcsupport/src/eval.c
index 9ef8c735a5..5a9118d3e1 100644
--- a/cpukit/libcsupport/src/eval.c
+++ b/cpukit/libcsupport/src/eval.c
@@ -3,7 +3,7 @@
*
* Routine to seed the evaluate path routine.
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -32,15 +32,17 @@ int rtems_filesystem_evaluate_relative_path(
int result;
rtems_filesystem_node_types_t type;
- /*
- * Verify Input parameters.
- */
+ #if defined(RTEMS_DEBUG)
+ /*
+ * Verify Input parameters that should never be bad unless someone
+ * is implementing a new filesystem and has bugs.
+ */
+ if ( !pathname )
+ rtems_set_errno_and_return_minus_one( EFAULT );
- if ( !pathname )
- rtems_set_errno_and_return_minus_one( EFAULT );
-
- if ( !pathloc )
- rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
+ if ( !pathloc )
+ rtems_set_errno_and_return_minus_one( EIO );
+ #endif
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
@@ -87,15 +89,17 @@ int rtems_filesystem_evaluate_path(
{
int i = 0;
- /*
- * Verify Input parameters.
- */
-
- if ( !pathname )
- rtems_set_errno_and_return_minus_one( EFAULT );
-
- if ( !pathloc )
- rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
+ #if defined(RTEMS_DEBUG)
+ /*
+ * Verify Input parameters that should never be bad unless someone
+ * is implementing a new filesystem and has bugs.
+ */
+ if ( !pathname )
+ rtems_set_errno_and_return_minus_one( EFAULT );
+
+ if ( !pathloc )
+ rtems_set_errno_and_return_minus_one( EIO );
+ #endif
/*
* Evaluate the path using the optable evalpath.