From 13e47e2e6bb80d87ccad7be9c26a04968b7a44ca Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Fri, 17 Nov 2000 18:46:03 +0000 Subject: 2000-11-17 Jennifer Averret * src/imfs/imfs_eval.c: Always return imaginary node at mount points. --- c/src/exec/libfs/src/imfs/imfs_eval.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'c/src/exec/libfs/src/imfs') diff --git a/c/src/exec/libfs/src/imfs/imfs_eval.c b/c/src/exec/libfs/src/imfs/imfs_eval.c index ebfe6c0f9b..913fddeaa7 100644 --- a/c/src/exec/libfs/src/imfs/imfs_eval.c +++ b/c/src/exec/libfs/src/imfs/imfs_eval.c @@ -608,17 +608,26 @@ int IMFS_eval_path( } /* - * Only return root node if this is the base file system. + * Always return the root node. + * + * If we are at a node that is a mount point. Set loc to the + * new fs root node and let let the mounted filesystem set the handlers. + * + * NOTE: The behavior of stat() on a mount point appears to be questionable. */ - if ((pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) && - (pathloc->node_access != rtems_filesystem_root.node_access) ) { - newloc = pathloc->mt_entry->mt_point_node; - *pathloc = newloc; + if ( node->type == IMFS_DIRECTORY ) { + if ( node->info.directory.mt_fs != NULL ) { + newloc = node->info.directory.mt_fs->mt_fs_root; + *pathloc = newloc; + return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); + } else { + result = IMFS_Set_handlers( pathloc ); + } + } else { + result = IMFS_Set_handlers( pathloc ); } - result = IMFS_Set_handlers( pathloc ); - /* * Verify we have the correct permissions for this node. */ @@ -628,12 +637,3 @@ int IMFS_eval_path( return result; } - - - - - - - - - -- cgit v1.2.3