mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 12:50:10 +08:00
IMFS: Removed superfluous imfs_dir_open()
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user