summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-02-05 00:28:43 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-02-05 00:28:43 +0000
commit2f87c84349248bf105de731c17cdf75d0050219a (patch)
treed88c1b261e2fb14ff1cba1e16a7245381765ed19
parentAdded optional data and instruction caching enable calls. (diff)
downloadrtems-2f87c84349248bf105de731c17cdf75d0050219a.tar.bz2
Corrected spacing and added some new error checks that were needed
to avoid dereferencing NULLs.
-rw-r--r--c/src/exec/libcsupport/src/mount.c36
-rw-r--r--c/src/exec/libcsupport/src/open.c4
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_eval.c18
-rw-r--r--c/src/lib/libc/imfs_eval.c18
-rw-r--r--c/src/lib/libc/mount.c36
-rw-r--r--c/src/lib/libc/open.c4
-rw-r--r--c/src/libfs/src/imfs/imfs_eval.c18
-rw-r--r--cpukit/libcsupport/src/mount.c36
-rw-r--r--cpukit/libcsupport/src/open.c4
-rw-r--r--cpukit/libfs/src/imfs/imfs_eval.c18
10 files changed, 111 insertions, 81 deletions
diff --git a/c/src/exec/libcsupport/src/mount.c b/c/src/exec/libcsupport/src/mount.c
index fa8cebc3f9..9b42c78118 100644
--- a/c/src/exec/libcsupport/src/mount.c
+++ b/c/src/exec/libcsupport/src/mount.c
@@ -101,20 +101,25 @@ int mount(
/* XXX add code to check for required operations */
/*
- * Are the file system options valid?
+ * Is there a file system operations table?
*/
- options = get_file_system_options( fsoptions );
- if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ){
+ if ( fs_ops == NULL ) {
errno = EINVAL;
return -1;
}
/*
- * Is the file system type valid?
+ * Are the file system options valid?
*/
- if ( fs_ops == NULL ){
+ if ( fsoptions == NULL ) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ options = get_file_system_options( fsoptions );
+ if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ) {
errno = EINVAL;
return -1;
}
@@ -125,12 +130,17 @@ int mount(
temp_mt_entry = malloc( sizeof(rtems_filesystem_mount_table_entry_t) );
+ if ( !temp_mt_entry ) {
+ errno = ENOMEM;
+ return -1;
+ }
+
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
- if( device )
- sprintf( temp_mt_entry->dev, "%s", device );
+ if ( device )
+ sprintf( temp_mt_entry->dev, "%s", device );
else
- temp_mt_entry->dev = 0;
+ temp_mt_entry->dev = 0;
/*
* The mount_point should be a directory with read/write/execute
@@ -149,7 +159,7 @@ int mount(
* Test to see if it is a directory
*/
- if ( temp_loc.ops->node_type( &temp_loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
+ if ( temp_loc.ops->node_type( &temp_loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
goto cleanup_and_bail;
}
@@ -158,7 +168,7 @@ int mount(
* You can only mount one file system onto a single mount point.
*/
- if ( search_mt_for_mount_point( &temp_loc ) == FOUND ){
+ if ( search_mt_for_mount_point( &temp_loc ) == FOUND ) {
errno = EBUSY;
goto cleanup_and_bail;
}
@@ -179,8 +189,8 @@ int mount(
*/
if ( !temp_loc.ops->mount ){
- errno = ENOTSUP;
- goto cleanup_and_bail;
+ errno = ENOTSUP;
+ goto cleanup_and_bail;
}
if ( temp_loc.ops->mount( temp_mt_entry ) ) {
@@ -282,7 +292,7 @@ int search_mt_for_mount_point(
rtems_filesystem_location_info_t *location_of_mount_point
)
{
- Chain_Node *the_node;
+ Chain_Node *the_node;
rtems_filesystem_mount_table_entry_t *the_mount_entry;
for ( the_node = rtems_filesystem_mount_table_control.first;
diff --git a/c/src/exec/libcsupport/src/open.c b/c/src/exec/libcsupport/src/open.c
index 4cdf5acf35..32fd4076e6 100644
--- a/c/src/exec/libcsupport/src/open.c
+++ b/c/src/exec/libcsupport/src/open.c
@@ -102,9 +102,9 @@ int open(
/*
* See if the file exists.
*/
-
- status = rtems_filesystem_evaluate_path( pathname, eval_flags, &temp_loc, TRUE );
+ status = rtems_filesystem_evaluate_path(
+ pathname, eval_flags, &temp_loc, TRUE );
if ( status == -1 ) {
if ( errno != ENOENT ) {
diff --git a/c/src/exec/libfs/src/imfs/imfs_eval.c b/c/src/exec/libfs/src/imfs/imfs_eval.c
index eb770a58ce..d6d444f6d2 100644
--- a/c/src/exec/libfs/src/imfs/imfs_eval.c
+++ b/c/src/exec/libfs/src/imfs/imfs_eval.c
@@ -70,7 +70,7 @@ int IMFS_evaluate_permission(
IMFS_jnode_t *jnode;
int flags_to_test;
- if (! rtems_libio_is_valid_perms( flags ) ) {
+ if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
set_errno_and_return_minus_one( EIO );
}
@@ -141,7 +141,7 @@ int IMFS_evaluate_hard_link(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( node, flags ) )
+ if ( !IMFS_evaluate_permission( node, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -203,7 +203,7 @@ int IMFS_evaluate_sym_link(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( node, flags ) )
+ if ( !IMFS_evaluate_permission( node, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -307,7 +307,7 @@ int IMFS_evaluate_for_make(
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
@@ -422,7 +422,7 @@ int IMFS_evaluate_for_make(
*/
for( ; path[i] != '\0'; i++) {
- if (! IMFS_is_separator( path[ i ] ) )
+ if ( !IMFS_is_separator( path[ i ] ) )
set_errno_and_return_minus_one( ENOENT );
}
@@ -443,7 +443,7 @@ int IMFS_evaluate_for_make(
* We must have Write and execute permission on the returned node.
*/
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -472,7 +472,7 @@ int IMFS_eval_path(
IMFS_jnode_t *node;
int result;
- if (! rtems_libio_is_valid_perms( flags ) ) {
+ if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
set_errno_and_return_minus_one( EIO );
}
@@ -501,7 +501,7 @@ int IMFS_eval_path(
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
@@ -622,7 +622,7 @@ int IMFS_eval_path(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( pathloc, flags ) )
+ if ( !IMFS_evaluate_permission( pathloc, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
diff --git a/c/src/lib/libc/imfs_eval.c b/c/src/lib/libc/imfs_eval.c
index eb770a58ce..d6d444f6d2 100644
--- a/c/src/lib/libc/imfs_eval.c
+++ b/c/src/lib/libc/imfs_eval.c
@@ -70,7 +70,7 @@ int IMFS_evaluate_permission(
IMFS_jnode_t *jnode;
int flags_to_test;
- if (! rtems_libio_is_valid_perms( flags ) ) {
+ if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
set_errno_and_return_minus_one( EIO );
}
@@ -141,7 +141,7 @@ int IMFS_evaluate_hard_link(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( node, flags ) )
+ if ( !IMFS_evaluate_permission( node, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -203,7 +203,7 @@ int IMFS_evaluate_sym_link(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( node, flags ) )
+ if ( !IMFS_evaluate_permission( node, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -307,7 +307,7 @@ int IMFS_evaluate_for_make(
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
@@ -422,7 +422,7 @@ int IMFS_evaluate_for_make(
*/
for( ; path[i] != '\0'; i++) {
- if (! IMFS_is_separator( path[ i ] ) )
+ if ( !IMFS_is_separator( path[ i ] ) )
set_errno_and_return_minus_one( ENOENT );
}
@@ -443,7 +443,7 @@ int IMFS_evaluate_for_make(
* We must have Write and execute permission on the returned node.
*/
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -472,7 +472,7 @@ int IMFS_eval_path(
IMFS_jnode_t *node;
int result;
- if (! rtems_libio_is_valid_perms( flags ) ) {
+ if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
set_errno_and_return_minus_one( EIO );
}
@@ -501,7 +501,7 @@ int IMFS_eval_path(
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
@@ -622,7 +622,7 @@ int IMFS_eval_path(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( pathloc, flags ) )
+ if ( !IMFS_evaluate_permission( pathloc, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
diff --git a/c/src/lib/libc/mount.c b/c/src/lib/libc/mount.c
index fa8cebc3f9..9b42c78118 100644
--- a/c/src/lib/libc/mount.c
+++ b/c/src/lib/libc/mount.c
@@ -101,20 +101,25 @@ int mount(
/* XXX add code to check for required operations */
/*
- * Are the file system options valid?
+ * Is there a file system operations table?
*/
- options = get_file_system_options( fsoptions );
- if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ){
+ if ( fs_ops == NULL ) {
errno = EINVAL;
return -1;
}
/*
- * Is the file system type valid?
+ * Are the file system options valid?
*/
- if ( fs_ops == NULL ){
+ if ( fsoptions == NULL ) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ options = get_file_system_options( fsoptions );
+ if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ) {
errno = EINVAL;
return -1;
}
@@ -125,12 +130,17 @@ int mount(
temp_mt_entry = malloc( sizeof(rtems_filesystem_mount_table_entry_t) );
+ if ( !temp_mt_entry ) {
+ errno = ENOMEM;
+ return -1;
+ }
+
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
- if( device )
- sprintf( temp_mt_entry->dev, "%s", device );
+ if ( device )
+ sprintf( temp_mt_entry->dev, "%s", device );
else
- temp_mt_entry->dev = 0;
+ temp_mt_entry->dev = 0;
/*
* The mount_point should be a directory with read/write/execute
@@ -149,7 +159,7 @@ int mount(
* Test to see if it is a directory
*/
- if ( temp_loc.ops->node_type( &temp_loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
+ if ( temp_loc.ops->node_type( &temp_loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
goto cleanup_and_bail;
}
@@ -158,7 +168,7 @@ int mount(
* You can only mount one file system onto a single mount point.
*/
- if ( search_mt_for_mount_point( &temp_loc ) == FOUND ){
+ if ( search_mt_for_mount_point( &temp_loc ) == FOUND ) {
errno = EBUSY;
goto cleanup_and_bail;
}
@@ -179,8 +189,8 @@ int mount(
*/
if ( !temp_loc.ops->mount ){
- errno = ENOTSUP;
- goto cleanup_and_bail;
+ errno = ENOTSUP;
+ goto cleanup_and_bail;
}
if ( temp_loc.ops->mount( temp_mt_entry ) ) {
@@ -282,7 +292,7 @@ int search_mt_for_mount_point(
rtems_filesystem_location_info_t *location_of_mount_point
)
{
- Chain_Node *the_node;
+ Chain_Node *the_node;
rtems_filesystem_mount_table_entry_t *the_mount_entry;
for ( the_node = rtems_filesystem_mount_table_control.first;
diff --git a/c/src/lib/libc/open.c b/c/src/lib/libc/open.c
index 4cdf5acf35..32fd4076e6 100644
--- a/c/src/lib/libc/open.c
+++ b/c/src/lib/libc/open.c
@@ -102,9 +102,9 @@ int open(
/*
* See if the file exists.
*/
-
- status = rtems_filesystem_evaluate_path( pathname, eval_flags, &temp_loc, TRUE );
+ status = rtems_filesystem_evaluate_path(
+ pathname, eval_flags, &temp_loc, TRUE );
if ( status == -1 ) {
if ( errno != ENOENT ) {
diff --git a/c/src/libfs/src/imfs/imfs_eval.c b/c/src/libfs/src/imfs/imfs_eval.c
index eb770a58ce..d6d444f6d2 100644
--- a/c/src/libfs/src/imfs/imfs_eval.c
+++ b/c/src/libfs/src/imfs/imfs_eval.c
@@ -70,7 +70,7 @@ int IMFS_evaluate_permission(
IMFS_jnode_t *jnode;
int flags_to_test;
- if (! rtems_libio_is_valid_perms( flags ) ) {
+ if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
set_errno_and_return_minus_one( EIO );
}
@@ -141,7 +141,7 @@ int IMFS_evaluate_hard_link(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( node, flags ) )
+ if ( !IMFS_evaluate_permission( node, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -203,7 +203,7 @@ int IMFS_evaluate_sym_link(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( node, flags ) )
+ if ( !IMFS_evaluate_permission( node, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -307,7 +307,7 @@ int IMFS_evaluate_for_make(
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
@@ -422,7 +422,7 @@ int IMFS_evaluate_for_make(
*/
for( ; path[i] != '\0'; i++) {
- if (! IMFS_is_separator( path[ i ] ) )
+ if ( !IMFS_is_separator( path[ i ] ) )
set_errno_and_return_minus_one( ENOENT );
}
@@ -443,7 +443,7 @@ int IMFS_evaluate_for_make(
* We must have Write and execute permission on the returned node.
*/
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -472,7 +472,7 @@ int IMFS_eval_path(
IMFS_jnode_t *node;
int result;
- if (! rtems_libio_is_valid_perms( flags ) ) {
+ if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
set_errno_and_return_minus_one( EIO );
}
@@ -501,7 +501,7 @@ int IMFS_eval_path(
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
@@ -622,7 +622,7 @@ int IMFS_eval_path(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( pathloc, flags ) )
+ if ( !IMFS_evaluate_permission( pathloc, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c
index fa8cebc3f9..9b42c78118 100644
--- a/cpukit/libcsupport/src/mount.c
+++ b/cpukit/libcsupport/src/mount.c
@@ -101,20 +101,25 @@ int mount(
/* XXX add code to check for required operations */
/*
- * Are the file system options valid?
+ * Is there a file system operations table?
*/
- options = get_file_system_options( fsoptions );
- if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ){
+ if ( fs_ops == NULL ) {
errno = EINVAL;
return -1;
}
/*
- * Is the file system type valid?
+ * Are the file system options valid?
*/
- if ( fs_ops == NULL ){
+ if ( fsoptions == NULL ) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ options = get_file_system_options( fsoptions );
+ if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ) {
errno = EINVAL;
return -1;
}
@@ -125,12 +130,17 @@ int mount(
temp_mt_entry = malloc( sizeof(rtems_filesystem_mount_table_entry_t) );
+ if ( !temp_mt_entry ) {
+ errno = ENOMEM;
+ return -1;
+ }
+
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
- if( device )
- sprintf( temp_mt_entry->dev, "%s", device );
+ if ( device )
+ sprintf( temp_mt_entry->dev, "%s", device );
else
- temp_mt_entry->dev = 0;
+ temp_mt_entry->dev = 0;
/*
* The mount_point should be a directory with read/write/execute
@@ -149,7 +159,7 @@ int mount(
* Test to see if it is a directory
*/
- if ( temp_loc.ops->node_type( &temp_loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
+ if ( temp_loc.ops->node_type( &temp_loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
goto cleanup_and_bail;
}
@@ -158,7 +168,7 @@ int mount(
* You can only mount one file system onto a single mount point.
*/
- if ( search_mt_for_mount_point( &temp_loc ) == FOUND ){
+ if ( search_mt_for_mount_point( &temp_loc ) == FOUND ) {
errno = EBUSY;
goto cleanup_and_bail;
}
@@ -179,8 +189,8 @@ int mount(
*/
if ( !temp_loc.ops->mount ){
- errno = ENOTSUP;
- goto cleanup_and_bail;
+ errno = ENOTSUP;
+ goto cleanup_and_bail;
}
if ( temp_loc.ops->mount( temp_mt_entry ) ) {
@@ -282,7 +292,7 @@ int search_mt_for_mount_point(
rtems_filesystem_location_info_t *location_of_mount_point
)
{
- Chain_Node *the_node;
+ Chain_Node *the_node;
rtems_filesystem_mount_table_entry_t *the_mount_entry;
for ( the_node = rtems_filesystem_mount_table_control.first;
diff --git a/cpukit/libcsupport/src/open.c b/cpukit/libcsupport/src/open.c
index 4cdf5acf35..32fd4076e6 100644
--- a/cpukit/libcsupport/src/open.c
+++ b/cpukit/libcsupport/src/open.c
@@ -102,9 +102,9 @@ int open(
/*
* See if the file exists.
*/
-
- status = rtems_filesystem_evaluate_path( pathname, eval_flags, &temp_loc, TRUE );
+ status = rtems_filesystem_evaluate_path(
+ pathname, eval_flags, &temp_loc, TRUE );
if ( status == -1 ) {
if ( errno != ENOENT ) {
diff --git a/cpukit/libfs/src/imfs/imfs_eval.c b/cpukit/libfs/src/imfs/imfs_eval.c
index eb770a58ce..d6d444f6d2 100644
--- a/cpukit/libfs/src/imfs/imfs_eval.c
+++ b/cpukit/libfs/src/imfs/imfs_eval.c
@@ -70,7 +70,7 @@ int IMFS_evaluate_permission(
IMFS_jnode_t *jnode;
int flags_to_test;
- if (! rtems_libio_is_valid_perms( flags ) ) {
+ if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
set_errno_and_return_minus_one( EIO );
}
@@ -141,7 +141,7 @@ int IMFS_evaluate_hard_link(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( node, flags ) )
+ if ( !IMFS_evaluate_permission( node, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -203,7 +203,7 @@ int IMFS_evaluate_sym_link(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( node, flags ) )
+ if ( !IMFS_evaluate_permission( node, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -307,7 +307,7 @@ int IMFS_evaluate_for_make(
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
@@ -422,7 +422,7 @@ int IMFS_evaluate_for_make(
*/
for( ; path[i] != '\0'; i++) {
- if (! IMFS_is_separator( path[ i ] ) )
+ if ( !IMFS_is_separator( path[ i ] ) )
set_errno_and_return_minus_one( ENOENT );
}
@@ -443,7 +443,7 @@ int IMFS_evaluate_for_make(
* We must have Write and execute permission on the returned node.
*/
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
set_errno_and_return_minus_one( EACCES );
return result;
@@ -472,7 +472,7 @@ int IMFS_eval_path(
IMFS_jnode_t *node;
int result;
- if (! rtems_libio_is_valid_perms( flags ) ) {
+ if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
set_errno_and_return_minus_one( EIO );
}
@@ -501,7 +501,7 @@ int IMFS_eval_path(
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
- if (! IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
+ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
@@ -622,7 +622,7 @@ int IMFS_eval_path(
* Verify we have the correct permissions for this node.
*/
- if (! IMFS_evaluate_permission( pathloc, flags ) )
+ if ( !IMFS_evaluate_permission( pathloc, flags ) )
set_errno_and_return_minus_one( EACCES );
return result;