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. --- cpukit/libfs/ChangeLog | 4 ++++ cpukit/libfs/src/imfs/imfs_eval.c | 32 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 16 deletions(-) (limited to 'cpukit') diff --git a/cpukit/libfs/ChangeLog b/cpukit/libfs/ChangeLog index fe5c92c5ad..3f8aae5fee 100644 --- a/cpukit/libfs/ChangeLog +++ b/cpukit/libfs/ChangeLog @@ -1,3 +1,7 @@ +2000-11-17 Jennifer Averret + + * src/imfs/imfs_eval.c: Always return imaginary node at mount points. + 2000-11-09 Ralf Corsepius * Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS. diff --git a/cpukit/libfs/src/imfs/imfs_eval.c b/cpukit/libfs/src/imfs/imfs_eval.c index ebfe6c0f9b..913fddeaa7 100644 --- a/cpukit/libfs/src/imfs/imfs_eval.c +++ b/cpukit/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