summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc/imfs_free.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libc/imfs_free.c')
-rw-r--r--c/src/lib/libc/imfs_free.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/c/src/lib/libc/imfs_free.c b/c/src/lib/libc/imfs_free.c
index 8216547c12..1dc6fd9425 100644
--- a/c/src/lib/libc/imfs_free.c
+++ b/c/src/lib/libc/imfs_free.c
@@ -35,65 +35,3 @@ int IMFS_freenodinfo(
return 0;
}
-
-/*
- * IMFS_freenod
- *
- * The following routine frees a node if possible.
- *
- * The routine returns 0 if the node was not freed and 1 if it was.
- *
- * NOTE: This routine is for INTERNAL IMFS use only.
- */
-
-int IMFS_freenod(
- rtems_filesystem_location_info_t *pathloc
-)
-{
- IMFS_jnode_t *the_jnode;
-
- the_jnode = pathloc->node_access;
-
- if ( the_jnode->type == IMFS_DIRECTORY ) {
-
- /*
- * You cannot remove a node that still has children
- */
-
- if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) )
- return ENOTEMPTY;
-
- /*
- * You cannot remove the file system root node.
- */
- if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
- return EBUSY;
-
- /*
- * You cannot remove a mountpoint.
- */
- if ( the_jnode->info.directory.mt_fs != NULL )
- return EBUSY;
- }
-
- if ( !rtems_libio_is_file_open( the_jnode ) &&
- (the_jnode->st_nlink < 1) ) {
-
- /*
- * Is the rtems_filesystem_current is this node?
- */
- if ( rtems_filesystem_current.node_access == pathloc->node_access ) {
- rtems_filesystem_current.node_access = NULL;
- }
-
- /*
- * Free memory associated with a memory file.
- */
- if ( the_jnode->type == IMFS_MEMORY_FILE )
- IMFS_memfile_remove( the_jnode );
-
- free( the_jnode );
- }
-
- return 0;
-}