diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-26 20:17:13 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-26 20:17:13 +0000 |
commit | 657e1bf66b9406cd4c18af1265443e9ebf006f39 (patch) | |
tree | c56bea6d27d9a6a19ac1f139839545db8b63347c /c/src/lib/libc/imfs_free.c | |
parent | Patch from Gerwin Pfab <pb@schenk.isar.de> to leave dispatching (diff) | |
download | rtems-657e1bf66b9406cd4c18af1265443e9ebf006f39.tar.bz2 |
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.
Diffstat (limited to 'c/src/lib/libc/imfs_free.c')
-rw-r--r-- | c/src/lib/libc/imfs_free.c | 62 |
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; -} |