forked from Imagelibrary/rtems
Corrected spacing and added some new error checks that were needed
to avoid dereferencing NULLs.
This commit is contained in:
@@ -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,9 +130,14 @@ 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 )
|
||||
if ( device )
|
||||
sprintf( temp_mt_entry->dev, "%s", device );
|
||||
else
|
||||
temp_mt_entry->dev = 0;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -103,8 +103,8 @@ 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 ) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,9 +130,14 @@ 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 )
|
||||
if ( device )
|
||||
sprintf( temp_mt_entry->dev, "%s", device );
|
||||
else
|
||||
temp_mt_entry->dev = 0;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -103,8 +103,8 @@ 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 ) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,9 +130,14 @@ 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 )
|
||||
if ( device )
|
||||
sprintf( temp_mt_entry->dev, "%s", device );
|
||||
else
|
||||
temp_mt_entry->dev = 0;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -103,8 +103,8 @@ 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 ) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user