diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-10-02 15:44:59 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-10-07 17:03:20 +0200 |
commit | c17d0b315baf3f3a3afb862f64d0acf424088442 (patch) | |
tree | 4b659a3d629d590525cadec5a32e57fd1ec8ad78 /cpukit/libfs/src/imfs/imfs_handlers_directory.c | |
parent | score: Critical fix for thread dispatching (diff) | |
download | rtems-c17d0b315baf3f3a3afb862f64d0acf424088442.tar.bz2 |
Filesystem: Reject removal of root nodes
Reject the removal of file system instance root nodes in rmdir() and
unlink() and return the EBUSY error status. File system instances can
be removed with unmount(). Remove root node special cases in IMFS,
DOSFS, and RFS.
Diffstat (limited to 'cpukit/libfs/src/imfs/imfs_handlers_directory.c')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_handlers_directory.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_directory.c b/cpukit/libfs/src/imfs/imfs_handlers_directory.c index 0663e7a206..9dcdcf2a90 100644 --- a/cpukit/libfs/src/imfs/imfs_handlers_directory.c +++ b/cpukit/libfs/src/imfs/imfs_handlers_directory.c @@ -74,14 +74,13 @@ static bool IMFS_is_mount_point( const IMFS_jnode_t *node ) } static IMFS_jnode_t *IMFS_node_remove_directory( - IMFS_jnode_t *node, - const IMFS_jnode_t *root_node + IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; node = NULL; - } else if ( node == root_node || IMFS_is_mount_point( node ) ) { + } else if ( IMFS_is_mount_point( node ) ) { errno = EBUSY; node = NULL; } |