Index: c/src/exec/libfs/src/imfs/deviceio.c
===================================================================
--- c/src/exec/libfs/src/imfs/deviceio.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/exec/libfs/src/imfs/deviceio.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -18,4 +18,5 @@
 #include <rtems.h>
 #include <rtems/libio.h>
+#include "libio_.h"
 
 #include "imfs.h"
@@ -214,2 +215,57 @@
  *  This IMFS_stat() is used.
  */
+
+/*
+ *  device_rmnod
+ */
+
+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;
+
+}
+
+
+
Index: c/src/exec/libfs/src/imfs/imfs.h
===================================================================
--- c/src/exec/libfs/src/imfs/imfs.h	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/exec/libfs/src/imfs/imfs.h	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -309,8 +309,4 @@
 );
 
-int IMFS_rmnod(
-  rtems_filesystem_location_info_t  *pathloc       /* IN */
-);
-
 int IMFS_mknod(
   const char                        *path,         /* IN */
@@ -354,4 +350,5 @@
   off_t          length             /* IN  */
 );
+
 int imfs_dir_open(
   rtems_libio_t *iop,             /* IN  */
@@ -360,7 +357,9 @@
   unsigned32     mode             /* IN  */
 );
+
 int imfs_dir_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int imfs_dir_read(
   rtems_libio_t *iop,              /* IN  */
@@ -368,4 +367,5 @@
   unsigned32     count             /* IN  */
 );
+
 int imfs_dir_lseek(
   rtems_libio_t        *iop,              /* IN  */
@@ -373,8 +373,14 @@
   int                   whence            /* IN  */
 );
+
 int imfs_dir_fstat(
   rtems_filesystem_location_info_t *loc,         /* IN  */
   struct stat                      *buf          /* OUT */
 );
+
+int imfs_dir_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int memfile_open(
   rtems_libio_t *iop,             /* IN  */
@@ -383,7 +389,9 @@
   unsigned32     mode             /* IN  */
 );
+
 int memfile_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int memfile_read(
   rtems_libio_t *iop,             /* IN  */
@@ -391,4 +399,5 @@
   unsigned32     count            /* IN  */
 );
+
 int memfile_write(
   rtems_libio_t *iop,             /* IN  */
@@ -396,4 +405,5 @@
   unsigned32     count            /* IN  */
 );
+
 int memfile_ioctl(
   rtems_libio_t *iop,             /* IN  */
@@ -401,4 +411,5 @@
   void          *buffer           /* IN  */
 );
+
 int memfile_lseek(
   rtems_libio_t        *iop,        /* IN  */
@@ -406,4 +417,9 @@
   int                   whence      /* IN  */
 );
+
+int memfile_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int device_open(
   rtems_libio_t *iop,            /* IN  */
@@ -412,7 +428,9 @@
   unsigned32     mode            /* IN  */
 );
+
 int device_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int device_read(
   rtems_libio_t *iop,            /* IN  */
@@ -420,4 +438,5 @@
   unsigned32     count           /* IN  */
 );
+
 int device_write(
   rtems_libio_t *iop,               /* IN  */
@@ -425,4 +444,5 @@
   unsigned32     count              /* IN  */
 );
+
 int device_ioctl(
   rtems_libio_t *iop,               /* IN  */
@@ -430,4 +450,5 @@
   void          *buffer             /* IN  */
 );
+
 int device_lseek(
   rtems_libio_t *iop,               /* IN  */
@@ -435,4 +456,9 @@
   int            whence             /* IN  */
 );
+
+int device_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int IMFS_utime(
   rtems_filesystem_location_info_t  *pathloc,       /* IN */
@@ -440,4 +466,5 @@
   time_t                             modtime        /* IN */
 );
+
 int IMFS_fchmod(
   rtems_filesystem_location_info_t *loc,
Index: c/src/exec/libfs/src/imfs/imfs_directory.c
===================================================================
--- c/src/exec/libfs/src/imfs/imfs_directory.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/exec/libfs/src/imfs/imfs_directory.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -270,3 +270,79 @@
 }
 
-
+/*
+ *  IMFS_dir_rmnod
+ *
+ *  This routine is available from the optable to remove a node 
+ *  from the IMFS file system.
+ */
+
+int imfs_dir_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+)
+{
+  IMFS_jnode_t *the_jnode;  
+
+  the_jnode = (IMFS_jnode_t *) pathloc->node_access;
+
+  /* 
+   * You cannot remove a node that still has children 
+   */
+
+  if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) )
+     set_errno_and_return_minus_one( ENOTEMPTY );
+
+  /* 
+   * You cannot remove the file system root node.
+   */
+
+  if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
+     set_errno_and_return_minus_one( EBUSY );
+
+  /* 
+   * You cannot remove a mountpoint.
+   */
+
+   if ( the_jnode->info.directory.mt_fs != NULL )
+     set_errno_and_return_minus_one( EBUSY );          
+ 
+  /* 
+   * 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;
+
+}
+
+
Index: c/src/exec/libfs/src/imfs/imfs_handlers_device.c
===================================================================
--- c/src/exec/libfs/src/imfs/imfs_handlers_device.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/exec/libfs/src/imfs/imfs_handlers_device.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,4 +35,4 @@
   NULL,   /* fdatasync */
   NULL,   /* fcntl */
-  IMFS_rmnod
+  device_rmnod
 };
Index: c/src/exec/libfs/src/imfs/imfs_handlers_directory.c
===================================================================
--- c/src/exec/libfs/src/imfs/imfs_handlers_directory.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/exec/libfs/src/imfs/imfs_handlers_directory.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,5 +35,5 @@
   IMFS_fdatasync,
   IMFS_fcntl,
-  IMFS_rmnod
+  imfs_dir_rmnod
 };
 
Index: c/src/exec/libfs/src/imfs/imfs_handlers_memfile.c
===================================================================
--- c/src/exec/libfs/src/imfs/imfs_handlers_memfile.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/exec/libfs/src/imfs/imfs_handlers_memfile.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,4 +35,4 @@
   IMFS_fdatasync,
   IMFS_fcntl,
-  IMFS_rmnod
+  memfile_rmnod
 };
Index: src/exec/libfs/src/imfs/imfs_rmnod.c
===================================================================
--- c/src/exec/libfs/src/imfs/imfs_rmnod.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
- *  IMFS_rmnod
- *
- *  This routine is available from the optable to remove a node 
- *  from the IMFS file system.
- *
- *  COPYRIGHT (c) 1989-1998.
- *  On-Line Applications Research Corporation (OAR).
- *  Copyright assigned to U.S. Government, 1994.
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.OARcorp.com/rtems/license.html.
- *
- *  $Id$
- */
-
-#include <errno.h>
-#include "libio_.h"
-#include "imfs.h"
-
-
-int IMFS_rmnod(
-  rtems_filesystem_location_info_t      *pathloc       /* IN */
-)
-{
-  IMFS_jnode_t *the_jnode;  
-
-  the_jnode = (IMFS_jnode_t *) 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 ) )
-       set_errno_and_return_minus_one( ENOTEMPTY );
-
-    /* 
-     * You cannot remove the file system root node.
-     */
-
-    if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
-       set_errno_and_return_minus_one( EBUSY );
-
-    /* 
-     * You cannot remove a mountpoint.
-     */
-
-     if ( the_jnode->info.directory.mt_fs != NULL )
-       set_errno_and_return_minus_one( EBUSY );          
-  } 
-    
-  /* 
-   * 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.
-     */
-
-    if ( the_jnode->type == IMFS_MEMORY_FILE ) 
-      IMFS_memfile_remove( the_jnode );
-
-    free( the_jnode );
-  }
-
-  return 0;
-
-}
-
-
Index: c/src/exec/libfs/src/imfs/imfs_unlink.c
===================================================================
--- c/src/exec/libfs/src/imfs/imfs_unlink.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/exec/libfs/src/imfs/imfs_unlink.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -56,5 +56,5 @@
     IMFS_update_ctime( node->info.hard_link.link_node );
     if ( node->info.hard_link.link_node->st_nlink < 1) {
-      result = IMFS_rmnod( &the_link );
+      result = (*loc->handlers->rmnod)( &the_link );
       if ( result != 0 )
         return -1;
@@ -62,5 +62,5 @@
   }
 
-  result = IMFS_rmnod( loc );
+  result = (*loc->handlers->rmnod)( &the_link );
 
   return result;
Index: c/src/exec/libfs/src/imfs/memfile.c
===================================================================
--- c/src/exec/libfs/src/imfs/memfile.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/exec/libfs/src/imfs/memfile.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -29,24 +29,4 @@
 
 #define MEMFILE_STATIC 
-
-/*
- *  Set of operations handlers for operations on memfile entities.
- */
-
-rtems_filesystem_file_handlers_r IMFS_memfile_handlers = {
-  memfile_open,
-  memfile_close,
-  memfile_read,
-  memfile_write,
-  memfile_ioctl,
-  memfile_lseek,
-  IMFS_stat,
-  IMFS_fchmod,
-  memfile_ftruncate,
-  NULL,                /* fpathconf */
-  NULL,                /* fsync */
-  IMFS_fdatasync,
-  IMFS_fcntl
-};
 
 /*
@@ -1057,2 +1037,61 @@
 }
 
+
+/*
+ *  memfile_rmnod
+ *
+ *  This routine is available from the optable to remove a node 
+ *  from the IMFS file system.
+ */
+
+int memfile_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.
+     */
+
+    IMFS_memfile_remove( the_jnode );
+
+    free( the_jnode );
+  }
+
+  return 0;
+
+}
+
+
Index: c/src/exec/libfs/src/imfs/miniimfs_init.c
===================================================================
--- c/src/exec/libfs/src/imfs/miniimfs_init.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/exec/libfs/src/imfs/miniimfs_init.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -38,5 +38,4 @@
   IMFS_node_type,
   IMFS_mknod,
-  NULL, /* XXX IMFS_rmnod, */
   NULL, /* XXX IMFS_chown, */
   NULL, /* XXX IMFS_freenodinfo, */
Index: c/src/lib/libc/Makefile.in
===================================================================
--- c/src/lib/libc/Makefile.in	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/lib/libc/Makefile.in	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -26,5 +26,5 @@
 IMFS_C_PIECES = imfs_chown imfs_creat imfs_directory imfs_eval imfs_free \
     imfs_fsunmount imfs_gtkn imfs_init imfs_initsupp imfs_link imfs_mknod \
-    imfs_mount imfs_fchmod imfs_rmnod imfs_unlink imfs_unmount imfs_utime \
+    imfs_mount imfs_fchmod imfs_unlink imfs_unmount imfs_utime \
     imfs_ntype imfs_stat imfs_getchild memfile deviceio imfs_handlers_device \
     imfs_handlers_directory imfs_handlers_memfile imfs_debug imfs_symlink \
Index: c/src/lib/libc/deviceio.c
===================================================================
--- c/src/lib/libc/deviceio.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/lib/libc/deviceio.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -18,4 +18,5 @@
 #include <rtems.h>
 #include <rtems/libio.h>
+#include "libio_.h"
 
 #include "imfs.h"
@@ -214,2 +215,57 @@
  *  This IMFS_stat() is used.
  */
+
+/*
+ *  device_rmnod
+ */
+
+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;
+
+}
+
+
+
Index: c/src/lib/libc/imfs.h
===================================================================
--- c/src/lib/libc/imfs.h	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/lib/libc/imfs.h	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -309,8 +309,4 @@
 );
 
-int IMFS_rmnod(
-  rtems_filesystem_location_info_t  *pathloc       /* IN */
-);
-
 int IMFS_mknod(
   const char                        *path,         /* IN */
@@ -354,4 +350,5 @@
   off_t          length             /* IN  */
 );
+
 int imfs_dir_open(
   rtems_libio_t *iop,             /* IN  */
@@ -360,7 +357,9 @@
   unsigned32     mode             /* IN  */
 );
+
 int imfs_dir_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int imfs_dir_read(
   rtems_libio_t *iop,              /* IN  */
@@ -368,4 +367,5 @@
   unsigned32     count             /* IN  */
 );
+
 int imfs_dir_lseek(
   rtems_libio_t        *iop,              /* IN  */
@@ -373,8 +373,14 @@
   int                   whence            /* IN  */
 );
+
 int imfs_dir_fstat(
   rtems_filesystem_location_info_t *loc,         /* IN  */
   struct stat                      *buf          /* OUT */
 );
+
+int imfs_dir_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int memfile_open(
   rtems_libio_t *iop,             /* IN  */
@@ -383,7 +389,9 @@
   unsigned32     mode             /* IN  */
 );
+
 int memfile_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int memfile_read(
   rtems_libio_t *iop,             /* IN  */
@@ -391,4 +399,5 @@
   unsigned32     count            /* IN  */
 );
+
 int memfile_write(
   rtems_libio_t *iop,             /* IN  */
@@ -396,4 +405,5 @@
   unsigned32     count            /* IN  */
 );
+
 int memfile_ioctl(
   rtems_libio_t *iop,             /* IN  */
@@ -401,4 +411,5 @@
   void          *buffer           /* IN  */
 );
+
 int memfile_lseek(
   rtems_libio_t        *iop,        /* IN  */
@@ -406,4 +417,9 @@
   int                   whence      /* IN  */
 );
+
+int memfile_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int device_open(
   rtems_libio_t *iop,            /* IN  */
@@ -412,7 +428,9 @@
   unsigned32     mode            /* IN  */
 );
+
 int device_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int device_read(
   rtems_libio_t *iop,            /* IN  */
@@ -420,4 +438,5 @@
   unsigned32     count           /* IN  */
 );
+
 int device_write(
   rtems_libio_t *iop,               /* IN  */
@@ -425,4 +444,5 @@
   unsigned32     count              /* IN  */
 );
+
 int device_ioctl(
   rtems_libio_t *iop,               /* IN  */
@@ -430,4 +450,5 @@
   void          *buffer             /* IN  */
 );
+
 int device_lseek(
   rtems_libio_t *iop,               /* IN  */
@@ -435,4 +456,9 @@
   int            whence             /* IN  */
 );
+
+int device_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int IMFS_utime(
   rtems_filesystem_location_info_t  *pathloc,       /* IN */
@@ -440,4 +466,5 @@
   time_t                             modtime        /* IN */
 );
+
 int IMFS_fchmod(
   rtems_filesystem_location_info_t *loc,
Index: c/src/lib/libc/imfs_directory.c
===================================================================
--- c/src/lib/libc/imfs_directory.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/lib/libc/imfs_directory.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -270,3 +270,79 @@
 }
 
-
+/*
+ *  IMFS_dir_rmnod
+ *
+ *  This routine is available from the optable to remove a node 
+ *  from the IMFS file system.
+ */
+
+int imfs_dir_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+)
+{
+  IMFS_jnode_t *the_jnode;  
+
+  the_jnode = (IMFS_jnode_t *) pathloc->node_access;
+
+  /* 
+   * You cannot remove a node that still has children 
+   */
+
+  if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) )
+     set_errno_and_return_minus_one( ENOTEMPTY );
+
+  /* 
+   * You cannot remove the file system root node.
+   */
+
+  if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
+     set_errno_and_return_minus_one( EBUSY );
+
+  /* 
+   * You cannot remove a mountpoint.
+   */
+
+   if ( the_jnode->info.directory.mt_fs != NULL )
+     set_errno_and_return_minus_one( EBUSY );          
+ 
+  /* 
+   * 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;
+
+}
+
+
Index: c/src/lib/libc/imfs_handlers_device.c
===================================================================
--- c/src/lib/libc/imfs_handlers_device.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/lib/libc/imfs_handlers_device.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,4 +35,4 @@
   NULL,   /* fdatasync */
   NULL,   /* fcntl */
-  IMFS_rmnod
+  device_rmnod
 };
Index: c/src/lib/libc/imfs_handlers_directory.c
===================================================================
--- c/src/lib/libc/imfs_handlers_directory.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/lib/libc/imfs_handlers_directory.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,5 +35,5 @@
   IMFS_fdatasync,
   IMFS_fcntl,
-  IMFS_rmnod
+  imfs_dir_rmnod
 };
 
Index: c/src/lib/libc/imfs_handlers_memfile.c
===================================================================
--- c/src/lib/libc/imfs_handlers_memfile.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/lib/libc/imfs_handlers_memfile.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,4 +35,4 @@
   IMFS_fdatasync,
   IMFS_fcntl,
-  IMFS_rmnod
+  memfile_rmnod
 };
Index: src/lib/libc/imfs_rmnod.c
===================================================================
--- c/src/lib/libc/imfs_rmnod.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
- *  IMFS_rmnod
- *
- *  This routine is available from the optable to remove a node 
- *  from the IMFS file system.
- *
- *  COPYRIGHT (c) 1989-1998.
- *  On-Line Applications Research Corporation (OAR).
- *  Copyright assigned to U.S. Government, 1994.
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.OARcorp.com/rtems/license.html.
- *
- *  $Id$
- */
-
-#include <errno.h>
-#include "libio_.h"
-#include "imfs.h"
-
-
-int IMFS_rmnod(
-  rtems_filesystem_location_info_t      *pathloc       /* IN */
-)
-{
-  IMFS_jnode_t *the_jnode;  
-
-  the_jnode = (IMFS_jnode_t *) 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 ) )
-       set_errno_and_return_minus_one( ENOTEMPTY );
-
-    /* 
-     * You cannot remove the file system root node.
-     */
-
-    if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
-       set_errno_and_return_minus_one( EBUSY );
-
-    /* 
-     * You cannot remove a mountpoint.
-     */
-
-     if ( the_jnode->info.directory.mt_fs != NULL )
-       set_errno_and_return_minus_one( EBUSY );          
-  } 
-    
-  /* 
-   * 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.
-     */
-
-    if ( the_jnode->type == IMFS_MEMORY_FILE ) 
-      IMFS_memfile_remove( the_jnode );
-
-    free( the_jnode );
-  }
-
-  return 0;
-
-}
-
-
Index: c/src/lib/libc/imfs_unlink.c
===================================================================
--- c/src/lib/libc/imfs_unlink.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/lib/libc/imfs_unlink.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -56,5 +56,5 @@
     IMFS_update_ctime( node->info.hard_link.link_node );
     if ( node->info.hard_link.link_node->st_nlink < 1) {
-      result = IMFS_rmnod( &the_link );
+      result = (*loc->handlers->rmnod)( &the_link );
       if ( result != 0 )
         return -1;
@@ -62,5 +62,5 @@
   }
 
-  result = IMFS_rmnod( loc );
+  result = (*loc->handlers->rmnod)( &the_link );
 
   return result;
Index: c/src/lib/libc/memfile.c
===================================================================
--- c/src/lib/libc/memfile.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/lib/libc/memfile.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -29,24 +29,4 @@
 
 #define MEMFILE_STATIC 
-
-/*
- *  Set of operations handlers for operations on memfile entities.
- */
-
-rtems_filesystem_file_handlers_r IMFS_memfile_handlers = {
-  memfile_open,
-  memfile_close,
-  memfile_read,
-  memfile_write,
-  memfile_ioctl,
-  memfile_lseek,
-  IMFS_stat,
-  IMFS_fchmod,
-  memfile_ftruncate,
-  NULL,                /* fpathconf */
-  NULL,                /* fsync */
-  IMFS_fdatasync,
-  IMFS_fcntl
-};
 
 /*
@@ -1057,2 +1037,61 @@
 }
 
+
+/*
+ *  memfile_rmnod
+ *
+ *  This routine is available from the optable to remove a node 
+ *  from the IMFS file system.
+ */
+
+int memfile_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.
+     */
+
+    IMFS_memfile_remove( the_jnode );
+
+    free( the_jnode );
+  }
+
+  return 0;
+
+}
+
+
Index: c/src/lib/libc/miniimfs_init.c
===================================================================
--- c/src/lib/libc/miniimfs_init.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/lib/libc/miniimfs_init.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -38,5 +38,4 @@
   IMFS_node_type,
   IMFS_mknod,
-  NULL, /* XXX IMFS_rmnod, */
   NULL, /* XXX IMFS_chown, */
   NULL, /* XXX IMFS_freenodinfo, */
Index: c/src/libfs/src/imfs/deviceio.c
===================================================================
--- c/src/libfs/src/imfs/deviceio.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/libfs/src/imfs/deviceio.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -18,4 +18,5 @@
 #include <rtems.h>
 #include <rtems/libio.h>
+#include "libio_.h"
 
 #include "imfs.h"
@@ -214,2 +215,57 @@
  *  This IMFS_stat() is used.
  */
+
+/*
+ *  device_rmnod
+ */
+
+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;
+
+}
+
+
+
Index: c/src/libfs/src/imfs/imfs.h
===================================================================
--- c/src/libfs/src/imfs/imfs.h	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/libfs/src/imfs/imfs.h	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -309,8 +309,4 @@
 );
 
-int IMFS_rmnod(
-  rtems_filesystem_location_info_t  *pathloc       /* IN */
-);
-
 int IMFS_mknod(
   const char                        *path,         /* IN */
@@ -354,4 +350,5 @@
   off_t          length             /* IN  */
 );
+
 int imfs_dir_open(
   rtems_libio_t *iop,             /* IN  */
@@ -360,7 +357,9 @@
   unsigned32     mode             /* IN  */
 );
+
 int imfs_dir_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int imfs_dir_read(
   rtems_libio_t *iop,              /* IN  */
@@ -368,4 +367,5 @@
   unsigned32     count             /* IN  */
 );
+
 int imfs_dir_lseek(
   rtems_libio_t        *iop,              /* IN  */
@@ -373,8 +373,14 @@
   int                   whence            /* IN  */
 );
+
 int imfs_dir_fstat(
   rtems_filesystem_location_info_t *loc,         /* IN  */
   struct stat                      *buf          /* OUT */
 );
+
+int imfs_dir_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int memfile_open(
   rtems_libio_t *iop,             /* IN  */
@@ -383,7 +389,9 @@
   unsigned32     mode             /* IN  */
 );
+
 int memfile_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int memfile_read(
   rtems_libio_t *iop,             /* IN  */
@@ -391,4 +399,5 @@
   unsigned32     count            /* IN  */
 );
+
 int memfile_write(
   rtems_libio_t *iop,             /* IN  */
@@ -396,4 +405,5 @@
   unsigned32     count            /* IN  */
 );
+
 int memfile_ioctl(
   rtems_libio_t *iop,             /* IN  */
@@ -401,4 +411,5 @@
   void          *buffer           /* IN  */
 );
+
 int memfile_lseek(
   rtems_libio_t        *iop,        /* IN  */
@@ -406,4 +417,9 @@
   int                   whence      /* IN  */
 );
+
+int memfile_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int device_open(
   rtems_libio_t *iop,            /* IN  */
@@ -412,7 +428,9 @@
   unsigned32     mode            /* IN  */
 );
+
 int device_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int device_read(
   rtems_libio_t *iop,            /* IN  */
@@ -420,4 +438,5 @@
   unsigned32     count           /* IN  */
 );
+
 int device_write(
   rtems_libio_t *iop,               /* IN  */
@@ -425,4 +444,5 @@
   unsigned32     count              /* IN  */
 );
+
 int device_ioctl(
   rtems_libio_t *iop,               /* IN  */
@@ -430,4 +450,5 @@
   void          *buffer             /* IN  */
 );
+
 int device_lseek(
   rtems_libio_t *iop,               /* IN  */
@@ -435,4 +456,9 @@
   int            whence             /* IN  */
 );
+
+int device_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int IMFS_utime(
   rtems_filesystem_location_info_t  *pathloc,       /* IN */
@@ -440,4 +466,5 @@
   time_t                             modtime        /* IN */
 );
+
 int IMFS_fchmod(
   rtems_filesystem_location_info_t *loc,
Index: c/src/libfs/src/imfs/imfs_directory.c
===================================================================
--- c/src/libfs/src/imfs/imfs_directory.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/libfs/src/imfs/imfs_directory.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -270,3 +270,79 @@
 }
 
-
+/*
+ *  IMFS_dir_rmnod
+ *
+ *  This routine is available from the optable to remove a node 
+ *  from the IMFS file system.
+ */
+
+int imfs_dir_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+)
+{
+  IMFS_jnode_t *the_jnode;  
+
+  the_jnode = (IMFS_jnode_t *) pathloc->node_access;
+
+  /* 
+   * You cannot remove a node that still has children 
+   */
+
+  if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) )
+     set_errno_and_return_minus_one( ENOTEMPTY );
+
+  /* 
+   * You cannot remove the file system root node.
+   */
+
+  if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
+     set_errno_and_return_minus_one( EBUSY );
+
+  /* 
+   * You cannot remove a mountpoint.
+   */
+
+   if ( the_jnode->info.directory.mt_fs != NULL )
+     set_errno_and_return_minus_one( EBUSY );          
+ 
+  /* 
+   * 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;
+
+}
+
+
Index: c/src/libfs/src/imfs/imfs_handlers_device.c
===================================================================
--- c/src/libfs/src/imfs/imfs_handlers_device.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/libfs/src/imfs/imfs_handlers_device.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,4 +35,4 @@
   NULL,   /* fdatasync */
   NULL,   /* fcntl */
-  IMFS_rmnod
+  device_rmnod
 };
Index: c/src/libfs/src/imfs/imfs_handlers_directory.c
===================================================================
--- c/src/libfs/src/imfs/imfs_handlers_directory.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/libfs/src/imfs/imfs_handlers_directory.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,5 +35,5 @@
   IMFS_fdatasync,
   IMFS_fcntl,
-  IMFS_rmnod
+  imfs_dir_rmnod
 };
 
Index: c/src/libfs/src/imfs/imfs_handlers_memfile.c
===================================================================
--- c/src/libfs/src/imfs/imfs_handlers_memfile.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/libfs/src/imfs/imfs_handlers_memfile.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,4 +35,4 @@
   IMFS_fdatasync,
   IMFS_fcntl,
-  IMFS_rmnod
+  memfile_rmnod
 };
Index: src/libfs/src/imfs/imfs_rmnod.c
===================================================================
--- c/src/libfs/src/imfs/imfs_rmnod.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
- *  IMFS_rmnod
- *
- *  This routine is available from the optable to remove a node 
- *  from the IMFS file system.
- *
- *  COPYRIGHT (c) 1989-1998.
- *  On-Line Applications Research Corporation (OAR).
- *  Copyright assigned to U.S. Government, 1994.
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.OARcorp.com/rtems/license.html.
- *
- *  $Id$
- */
-
-#include <errno.h>
-#include "libio_.h"
-#include "imfs.h"
-
-
-int IMFS_rmnod(
-  rtems_filesystem_location_info_t      *pathloc       /* IN */
-)
-{
-  IMFS_jnode_t *the_jnode;  
-
-  the_jnode = (IMFS_jnode_t *) 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 ) )
-       set_errno_and_return_minus_one( ENOTEMPTY );
-
-    /* 
-     * You cannot remove the file system root node.
-     */
-
-    if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
-       set_errno_and_return_minus_one( EBUSY );
-
-    /* 
-     * You cannot remove a mountpoint.
-     */
-
-     if ( the_jnode->info.directory.mt_fs != NULL )
-       set_errno_and_return_minus_one( EBUSY );          
-  } 
-    
-  /* 
-   * 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.
-     */
-
-    if ( the_jnode->type == IMFS_MEMORY_FILE ) 
-      IMFS_memfile_remove( the_jnode );
-
-    free( the_jnode );
-  }
-
-  return 0;
-
-}
-
-
Index: c/src/libfs/src/imfs/imfs_unlink.c
===================================================================
--- c/src/libfs/src/imfs/imfs_unlink.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/libfs/src/imfs/imfs_unlink.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -56,5 +56,5 @@
     IMFS_update_ctime( node->info.hard_link.link_node );
     if ( node->info.hard_link.link_node->st_nlink < 1) {
-      result = IMFS_rmnod( &the_link );
+      result = (*loc->handlers->rmnod)( &the_link );
       if ( result != 0 )
         return -1;
@@ -62,5 +62,5 @@
   }
 
-  result = IMFS_rmnod( loc );
+  result = (*loc->handlers->rmnod)( &the_link );
 
   return result;
Index: c/src/libfs/src/imfs/memfile.c
===================================================================
--- c/src/libfs/src/imfs/memfile.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/libfs/src/imfs/memfile.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -29,24 +29,4 @@
 
 #define MEMFILE_STATIC 
-
-/*
- *  Set of operations handlers for operations on memfile entities.
- */
-
-rtems_filesystem_file_handlers_r IMFS_memfile_handlers = {
-  memfile_open,
-  memfile_close,
-  memfile_read,
-  memfile_write,
-  memfile_ioctl,
-  memfile_lseek,
-  IMFS_stat,
-  IMFS_fchmod,
-  memfile_ftruncate,
-  NULL,                /* fpathconf */
-  NULL,                /* fsync */
-  IMFS_fdatasync,
-  IMFS_fcntl
-};
 
 /*
@@ -1057,2 +1037,61 @@
 }
 
+
+/*
+ *  memfile_rmnod
+ *
+ *  This routine is available from the optable to remove a node 
+ *  from the IMFS file system.
+ */
+
+int memfile_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.
+     */
+
+    IMFS_memfile_remove( the_jnode );
+
+    free( the_jnode );
+  }
+
+  return 0;
+
+}
+
+
Index: c/src/libfs/src/imfs/miniimfs_init.c
===================================================================
--- c/src/libfs/src/imfs/miniimfs_init.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ c/src/libfs/src/imfs/miniimfs_init.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -38,5 +38,4 @@
   IMFS_node_type,
   IMFS_mknod,
-  NULL, /* XXX IMFS_rmnod, */
   NULL, /* XXX IMFS_chown, */
   NULL, /* XXX IMFS_freenodinfo, */
Index: cpukit/libfs/src/imfs/deviceio.c
===================================================================
--- cpukit/libfs/src/imfs/deviceio.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ cpukit/libfs/src/imfs/deviceio.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -18,4 +18,5 @@
 #include <rtems.h>
 #include <rtems/libio.h>
+#include "libio_.h"
 
 #include "imfs.h"
@@ -214,2 +215,57 @@
  *  This IMFS_stat() is used.
  */
+
+/*
+ *  device_rmnod
+ */
+
+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;
+
+}
+
+
+
Index: cpukit/libfs/src/imfs/imfs.h
===================================================================
--- cpukit/libfs/src/imfs/imfs.h	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ cpukit/libfs/src/imfs/imfs.h	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -309,8 +309,4 @@
 );
 
-int IMFS_rmnod(
-  rtems_filesystem_location_info_t  *pathloc       /* IN */
-);
-
 int IMFS_mknod(
   const char                        *path,         /* IN */
@@ -354,4 +350,5 @@
   off_t          length             /* IN  */
 );
+
 int imfs_dir_open(
   rtems_libio_t *iop,             /* IN  */
@@ -360,7 +357,9 @@
   unsigned32     mode             /* IN  */
 );
+
 int imfs_dir_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int imfs_dir_read(
   rtems_libio_t *iop,              /* IN  */
@@ -368,4 +367,5 @@
   unsigned32     count             /* IN  */
 );
+
 int imfs_dir_lseek(
   rtems_libio_t        *iop,              /* IN  */
@@ -373,8 +373,14 @@
   int                   whence            /* IN  */
 );
+
 int imfs_dir_fstat(
   rtems_filesystem_location_info_t *loc,         /* IN  */
   struct stat                      *buf          /* OUT */
 );
+
+int imfs_dir_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int memfile_open(
   rtems_libio_t *iop,             /* IN  */
@@ -383,7 +389,9 @@
   unsigned32     mode             /* IN  */
 );
+
 int memfile_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int memfile_read(
   rtems_libio_t *iop,             /* IN  */
@@ -391,4 +399,5 @@
   unsigned32     count            /* IN  */
 );
+
 int memfile_write(
   rtems_libio_t *iop,             /* IN  */
@@ -396,4 +405,5 @@
   unsigned32     count            /* IN  */
 );
+
 int memfile_ioctl(
   rtems_libio_t *iop,             /* IN  */
@@ -401,4 +411,5 @@
   void          *buffer           /* IN  */
 );
+
 int memfile_lseek(
   rtems_libio_t        *iop,        /* IN  */
@@ -406,4 +417,9 @@
   int                   whence      /* IN  */
 );
+
+int memfile_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int device_open(
   rtems_libio_t *iop,            /* IN  */
@@ -412,7 +428,9 @@
   unsigned32     mode            /* IN  */
 );
+
 int device_close(
   rtems_libio_t *iop             /* IN  */
 );
+
 int device_read(
   rtems_libio_t *iop,            /* IN  */
@@ -420,4 +438,5 @@
   unsigned32     count           /* IN  */
 );
+
 int device_write(
   rtems_libio_t *iop,               /* IN  */
@@ -425,4 +444,5 @@
   unsigned32     count              /* IN  */
 );
+
 int device_ioctl(
   rtems_libio_t *iop,               /* IN  */
@@ -430,4 +450,5 @@
   void          *buffer             /* IN  */
 );
+
 int device_lseek(
   rtems_libio_t *iop,               /* IN  */
@@ -435,4 +456,9 @@
   int            whence             /* IN  */
 );
+
+int device_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+);
+
 int IMFS_utime(
   rtems_filesystem_location_info_t  *pathloc,       /* IN */
@@ -440,4 +466,5 @@
   time_t                             modtime        /* IN */
 );
+
 int IMFS_fchmod(
   rtems_filesystem_location_info_t *loc,
Index: cpukit/libfs/src/imfs/imfs_directory.c
===================================================================
--- cpukit/libfs/src/imfs/imfs_directory.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ cpukit/libfs/src/imfs/imfs_directory.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -270,3 +270,79 @@
 }
 
-
+/*
+ *  IMFS_dir_rmnod
+ *
+ *  This routine is available from the optable to remove a node 
+ *  from the IMFS file system.
+ */
+
+int imfs_dir_rmnod(
+  rtems_filesystem_location_info_t      *pathloc       /* IN */
+)
+{
+  IMFS_jnode_t *the_jnode;  
+
+  the_jnode = (IMFS_jnode_t *) pathloc->node_access;
+
+  /* 
+   * You cannot remove a node that still has children 
+   */
+
+  if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) )
+     set_errno_and_return_minus_one( ENOTEMPTY );
+
+  /* 
+   * You cannot remove the file system root node.
+   */
+
+  if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
+     set_errno_and_return_minus_one( EBUSY );
+
+  /* 
+   * You cannot remove a mountpoint.
+   */
+
+   if ( the_jnode->info.directory.mt_fs != NULL )
+     set_errno_and_return_minus_one( EBUSY );          
+ 
+  /* 
+   * 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;
+
+}
+
+
Index: cpukit/libfs/src/imfs/imfs_handlers_device.c
===================================================================
--- cpukit/libfs/src/imfs/imfs_handlers_device.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ cpukit/libfs/src/imfs/imfs_handlers_device.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,4 +35,4 @@
   NULL,   /* fdatasync */
   NULL,   /* fcntl */
-  IMFS_rmnod
+  device_rmnod
 };
Index: cpukit/libfs/src/imfs/imfs_handlers_directory.c
===================================================================
--- cpukit/libfs/src/imfs/imfs_handlers_directory.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ cpukit/libfs/src/imfs/imfs_handlers_directory.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,5 +35,5 @@
   IMFS_fdatasync,
   IMFS_fcntl,
-  IMFS_rmnod
+  imfs_dir_rmnod
 };
 
Index: cpukit/libfs/src/imfs/imfs_handlers_memfile.c
===================================================================
--- cpukit/libfs/src/imfs/imfs_handlers_memfile.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ cpukit/libfs/src/imfs/imfs_handlers_memfile.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -35,4 +35,4 @@
   IMFS_fdatasync,
   IMFS_fcntl,
-  IMFS_rmnod
+  memfile_rmnod
 };
Index: ukit/libfs/src/imfs/imfs_rmnod.c
===================================================================
--- cpukit/libfs/src/imfs/imfs_rmnod.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
- *  IMFS_rmnod
- *
- *  This routine is available from the optable to remove a node 
- *  from the IMFS file system.
- *
- *  COPYRIGHT (c) 1989-1998.
- *  On-Line Applications Research Corporation (OAR).
- *  Copyright assigned to U.S. Government, 1994.
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.OARcorp.com/rtems/license.html.
- *
- *  $Id$
- */
-
-#include <errno.h>
-#include "libio_.h"
-#include "imfs.h"
-
-
-int IMFS_rmnod(
-  rtems_filesystem_location_info_t      *pathloc       /* IN */
-)
-{
-  IMFS_jnode_t *the_jnode;  
-
-  the_jnode = (IMFS_jnode_t *) 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 ) )
-       set_errno_and_return_minus_one( ENOTEMPTY );
-
-    /* 
-     * You cannot remove the file system root node.
-     */
-
-    if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
-       set_errno_and_return_minus_one( EBUSY );
-
-    /* 
-     * You cannot remove a mountpoint.
-     */
-
-     if ( the_jnode->info.directory.mt_fs != NULL )
-       set_errno_and_return_minus_one( EBUSY );          
-  } 
-    
-  /* 
-   * 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.
-     */
-
-    if ( the_jnode->type == IMFS_MEMORY_FILE ) 
-      IMFS_memfile_remove( the_jnode );
-
-    free( the_jnode );
-  }
-
-  return 0;
-
-}
-
-
Index: cpukit/libfs/src/imfs/imfs_unlink.c
===================================================================
--- cpukit/libfs/src/imfs/imfs_unlink.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ cpukit/libfs/src/imfs/imfs_unlink.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -56,5 +56,5 @@
     IMFS_update_ctime( node->info.hard_link.link_node );
     if ( node->info.hard_link.link_node->st_nlink < 1) {
-      result = IMFS_rmnod( &the_link );
+      result = (*loc->handlers->rmnod)( &the_link );
       if ( result != 0 )
         return -1;
@@ -62,5 +62,5 @@
   }
 
-  result = IMFS_rmnod( loc );
+  result = (*loc->handlers->rmnod)( &the_link );
 
   return result;
Index: cpukit/libfs/src/imfs/memfile.c
===================================================================
--- cpukit/libfs/src/imfs/memfile.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ cpukit/libfs/src/imfs/memfile.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -29,24 +29,4 @@
 
 #define MEMFILE_STATIC 
-
-/*
- *  Set of operations handlers for operations on memfile entities.
- */
-
-rtems_filesystem_file_handlers_r IMFS_memfile_handlers = {
-  memfile_open,
-  memfile_close,
-  memfile_read,
-  memfile_write,
-  memfile_ioctl,
-  memfile_lseek,
-  IMFS_stat,
-  IMFS_fchmod,
-  memfile_ftruncate,
-  NULL,                /* fpathconf */
-  NULL,                /* fsync */
-  IMFS_fdatasync,
-  IMFS_fcntl
-};
 
 /*
@@ -1057,2 +1037,61 @@
 }
 
+
+/*
+ *  memfile_rmnod
+ *
+ *  This routine is available from the optable to remove a node 
+ *  from the IMFS file system.
+ */
+
+int memfile_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.
+     */
+
+    IMFS_memfile_remove( the_jnode );
+
+    free( the_jnode );
+  }
+
+  return 0;
+
+}
+
+
Index: cpukit/libfs/src/imfs/miniimfs_init.c
===================================================================
--- cpukit/libfs/src/imfs/miniimfs_init.c	(revision 317a5b52b5060ef98ffe2b3bb3f980165fea8e81)
+++ cpukit/libfs/src/imfs/miniimfs_init.c	(revision b568ccb7455fa29df50205d5fc13802598ced1d6)
@@ -38,5 +38,4 @@
   IMFS_node_type,
   IMFS_mknod,
-  NULL, /* XXX IMFS_rmnod, */
   NULL, /* XXX IMFS_chown, */
   NULL, /* XXX IMFS_freenodinfo, */
