forked from Imagelibrary/rtems
2011-07-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/include/rtems/libio_.h: Added rtems_filesystem_is_root_location(). * libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_eval.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_eval.c: Use rtems_filesystem_is_root_location().
This commit is contained in:
@@ -679,7 +679,7 @@ msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
|
||||
/*
|
||||
* You cannot remove the file system root node.
|
||||
*/
|
||||
if (pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access)
|
||||
if (rtems_filesystem_is_root_location(pathloc))
|
||||
{
|
||||
rtems_semaphore_release(fs_info->vol_sema);
|
||||
rtems_set_errno_and_return_minus_one(EBUSY);
|
||||
|
||||
@@ -128,8 +128,7 @@ msdos_eval_path(
|
||||
/*
|
||||
* Am I at the root of this mounted filesystem?
|
||||
*/
|
||||
if (pathloc->node_access ==
|
||||
pathloc->mt_entry->mt_fs_root.node_access)
|
||||
if (rtems_filesystem_is_root_location(pathloc))
|
||||
{
|
||||
/*
|
||||
* Am I at the root of all filesystems?
|
||||
@@ -310,8 +309,7 @@ msdos_eval4make(
|
||||
/*
|
||||
* Am I at the root of this mounted filesystem?
|
||||
*/
|
||||
if (pathloc->node_access ==
|
||||
pathloc->mt_entry->mt_fs_root.node_access)
|
||||
if (rtems_filesystem_is_root_location(pathloc))
|
||||
{
|
||||
/*
|
||||
* Am I at the root of all filesystems?
|
||||
|
||||
@@ -300,7 +300,7 @@ int imfs_dir_rmnod(
|
||||
* You cannot remove the file system root node.
|
||||
*/
|
||||
|
||||
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
|
||||
if ( rtems_filesystem_is_root_location(pathloc) )
|
||||
rtems_set_errno_and_return_minus_one( EBUSY );
|
||||
|
||||
/*
|
||||
|
||||
@@ -346,7 +346,7 @@ int IMFS_evaluate_for_make(
|
||||
* Am I at the root of this mounted filesystem?
|
||||
*/
|
||||
|
||||
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
|
||||
if ( rtems_filesystem_is_root_location( pathloc ) ) {
|
||||
|
||||
/*
|
||||
* Am I at the root of all filesystems?
|
||||
@@ -544,8 +544,7 @@ int IMFS_eval_path(
|
||||
* Am I at the root of this mounted filesystem?
|
||||
*/
|
||||
|
||||
if (pathloc->node_access ==
|
||||
pathloc->mt_entry->mt_fs_root.node_access) {
|
||||
if ( rtems_filesystem_is_root_location( pathloc ) ) {
|
||||
|
||||
/*
|
||||
* Am I at the root of all filesystems?
|
||||
|
||||
Reference in New Issue
Block a user