From 657e1bf66b9406cd4c18af1265443e9ebf006f39 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 26 Oct 1999 20:17:13 +0000 Subject: Added initial cut at miniIMFS which leaves out memfile and directory readdir support. The next step is to add a mount table and configure either the miniIMFS or the full IMFS at the application level. --- cpukit/libfs/src/imfs/imfs_free.c | 62 --------------------------------------- 1 file changed, 62 deletions(-) (limited to 'cpukit/libfs/src/imfs/imfs_free.c') diff --git a/cpukit/libfs/src/imfs/imfs_free.c b/cpukit/libfs/src/imfs/imfs_free.c index 8216547c12..1dc6fd9425 100644 --- a/cpukit/libfs/src/imfs/imfs_free.c +++ b/cpukit/libfs/src/imfs/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; -} -- cgit v1.2.3