[rtems commit] IMFS: Removed superfluous imfs_dir_open()

Joel Sherrill joel at rtems.org
Thu Mar 29 14:14:29 UTC 2012


Module:    rtems
Branch:    master
Commit:    b594f05ff3713eb0158f08bd68239fd7e0be5612
Changeset: http://git.rtems.org/rtems/commit/?id=b594f05ff3713eb0158f08bd68239fd7e0be5612

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Feb 24 09:21:04 2012 +0100

IMFS: Removed superfluous imfs_dir_open()

---

 cpukit/libfs/src/imfs/imfs.h                    |    7 ------
 cpukit/libfs/src/imfs/imfs_directory.c          |   27 -----------------------
 cpukit/libfs/src/imfs/imfs_handlers_directory.c |    2 +-
 3 files changed, 1 insertions(+), 35 deletions(-)

diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h
index e9be053..94988a0 100644
--- a/cpukit/libfs/src/imfs/imfs.h
+++ b/cpukit/libfs/src/imfs/imfs.h
@@ -352,13 +352,6 @@ extern int memfile_ftruncate(
   off_t          length             /* IN  */
 );
 
-extern int imfs_dir_open(
-  rtems_libio_t *iop,             /* IN  */
-  const char    *pathname,        /* IN  */
-  int            oflag,           /* IN  */
-  mode_t         mode             /* IN  */
-);
-
 extern ssize_t imfs_dir_read(
   rtems_libio_t *iop,              /* IN  */
   void          *buffer,           /* IN  */
diff --git a/cpukit/libfs/src/imfs/imfs_directory.c b/cpukit/libfs/src/imfs/imfs_directory.c
index 3bbbec2..c6be71f 100644
--- a/cpukit/libfs/src/imfs/imfs_directory.c
+++ b/cpukit/libfs/src/imfs/imfs_directory.c
@@ -21,33 +21,6 @@
 #include <dirent.h>
 
 /*
- *  imfs_dir_open
- *
- *  This rountine will verify that the node being opened as a directory is
- *  in fact a directory node. If it is then the offset into the directory
- *  will be set to 0 to position to the first directory entry.
- */
-
-int imfs_dir_open(
-  rtems_libio_t  *iop,
-  const char *pathname,
-  int oflag,
-  mode_t mode
-)
-{
-  IMFS_jnode_t      *the_jnode;
-
-  /* Is the node a directory ? */
-  the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
-
-  if ( the_jnode->type != IMFS_DIRECTORY )
-     return -1;      /* It wasn't a directory --> return error */
-
-  iop->offset = 0;
-  return 0;
-}
-
-/*
  *  imfs_dir_read
  *
  *  This routine will read the next directory entry based on the directory
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_directory.c b/cpukit/libfs/src/imfs/imfs_handlers_directory.c
index b18f2ab..842f098 100644
--- a/cpukit/libfs/src/imfs/imfs_handlers_directory.c
+++ b/cpukit/libfs/src/imfs/imfs_handlers_directory.c
@@ -22,7 +22,7 @@
  */
 
 const rtems_filesystem_file_handlers_r IMFS_directory_handlers = {
-  imfs_dir_open,
+  rtems_filesystem_default_open,
   rtems_filesystem_default_close,
   imfs_dir_read,
   rtems_filesystem_default_write,




More information about the vc mailing list