diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-02-24 09:21:04 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-13 12:24:16 +0100 |
commit | 6661435f8498e6255525d17973ff02ed9d885e92 (patch) | |
tree | 6c4955ad57daf149563e20cc3aa55f99d9cf636d /cpukit | |
parent | IMFS: Reference counting for nodes (diff) | |
download | rtems-6661435f8498e6255525d17973ff02ed9d885e92.tar.bz2 |
IMFS: Removed superfluous imfs_dir_open()
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs.h | 7 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_directory.c | 27 | ||||
-rw-r--r-- | 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 e9be053c20..94988a047c 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 3bbbec22fb..c6be71ffcc 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 b18f2ab6b9..842f098fc8 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, |