IMFS: Removed superfluous imfs_dir_open()

This commit is contained in:
Sebastian Huber
2012-03-13 12:24:16 +01:00
parent 1bdff036ac
commit 6661435f84
3 changed files with 1 additions and 35 deletions
-7
View File
@@ -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 */
-27
View File
@@ -20,33 +20,6 @@
#include <string.h>
#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
*
@@ -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,