diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-05 21:10:54 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-05 21:10:54 +0000 |
commit | 94b357c2b31be20b51784dc6f2ae837d58777cbd (patch) | |
tree | 73e3ec3694451a65df6b0688e3e0e04175ea0528 /c/src/lib/libc/deviceio.c | |
parent | Removed. (diff) | |
download | rtems-94b357c2b31be20b51784dc6f2ae837d58777cbd.tar.bz2 |
Unmount was failing as a side-effect of splitting the rmnod handler
and not handling every case properly.
Diffstat (limited to 'c/src/lib/libc/deviceio.c')
-rw-r--r-- | c/src/lib/libc/deviceio.c | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/c/src/lib/libc/deviceio.c b/c/src/lib/libc/deviceio.c index 70b9706ada..fd969e7aa9 100644 --- a/c/src/lib/libc/deviceio.c +++ b/c/src/lib/libc/deviceio.c @@ -212,60 +212,11 @@ int device_lseek( /* * device_stat * - * This IMFS_stat() is used. + * The IMFS_stat() is used. */ /* * device_rmnod + * + * The IMFS_rmnod() is used. */ - -int device_rmnod( - rtems_filesystem_location_info_t *pathloc /* IN */ -) -{ - IMFS_jnode_t *the_jnode; - - the_jnode = (IMFS_jnode_t *) pathloc->node_access; - - /* - * Take the node out of the parent's chain that contains this node - */ - - if ( the_jnode->Parent != NULL ) { - Chain_Extract( (Chain_Node *) the_jnode ); - the_jnode->Parent = NULL; - } - - /* - * Decrement the link counter and see if we can free the space. - */ - - the_jnode->st_nlink--; - IMFS_update_ctime( the_jnode ); - - /* - * The file cannot be open and the link must be less than 1 to free. - */ - - 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. - */ - - free( the_jnode ); - } - - return 0; - -} - - - |