* libcsupport/include/rtems/libio_.h: Removed rtems_filesystem_null_handlers.
	* libcsupport/src/fs_null_handlers.c: Removed file.
	* libcsupport/Makefile.am: Reflect change above.
	* libfs/src/nfsclient/src/nfs.c, libfs/src/imfs/imfs_creat.c,
	libfs/src/imfs/imfs_init.c, libfs/src/imfs/miniimfs_init.c: Use
	rtems_filesystem_handlers_default instead of
	rtems_filesystem_null_handlers.
	* libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c:
	Initialize handler and operations table with proper defaults.
This commit is contained in:
Sebastian Huber
2010-07-15 08:46:06 +00:00
parent fd2b1634bb
commit de39b5127d
10 changed files with 81 additions and 111 deletions
+12
View File
@@ -1,3 +1,15 @@
2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/include/rtems/libio_.h: Removed rtems_filesystem_null_handlers.
* libcsupport/src/fs_null_handlers.c: Removed file.
* libcsupport/Makefile.am: Reflect change above.
* libfs/src/nfsclient/src/nfs.c, libfs/src/imfs/imfs_creat.c,
libfs/src/imfs/imfs_init.c, libfs/src/imfs/miniimfs_init.c: Use
rtems_filesystem_handlers_default instead of
rtems_filesystem_null_handlers.
* libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c:
Initialize handler and operations table with proper defaults.
2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/include/rtems/libio.h: Removed file_info and handlers
+1 -1
View File
@@ -45,7 +45,7 @@ ASSOCIATION_C_FILES = src/assoclocalbyname.c \
BASE_FS_C_FILES = src/base_fs.c src/mount.c src/unmount.c src/libio.c \
src/mount-mgr.c src/mount-mktgt.c src/libio_init.c \
src/eval.c src/fs_null_handlers.c src/privateenv.c \
src/eval.c src/privateenv.c \
src/open_dev_console.c src/__usrenv.c src/rtems_mkdir.c
if LIBNETWORKING
@@ -37,7 +37,6 @@ extern "C" {
#define RTEMS_LIBIO_IOP_SEM(n) rtems_build_name('L', 'B', 'I', n)
extern rtems_id rtems_libio_semaphore;
extern const rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers;
/*
* File descriptor Table Information
-41
View File
@@ -1,41 +0,0 @@
/*
* Null Filesystem Operations Tables
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <errno.h>
#include <rtems/libio.h>
/*
* Set of null operations handlers.
*/
const rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers = {
NULL, /* open */
NULL, /* close */
NULL, /* read */
NULL, /* write */
NULL, /* ioctl */
NULL, /* lseek */
NULL, /* fstat */
NULL, /* fchmod */
NULL, /* ftruncate */
NULL, /* fpathconf */
NULL, /* fsync */
NULL, /* fdatasync */
NULL, /* fcntl */
NULL /* rmnod */
};
+1 -1
View File
@@ -54,7 +54,7 @@ IMFS_jnode_t *IMFS_create_node(
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
fs_info->fifo_handlers == &rtems_filesystem_null_handlers )
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
/*
+1 -1
View File
@@ -56,6 +56,6 @@ int IMFS_initialize(
&IMFS_ops,
&IMFS_memfile_handlers,
&IMFS_directory_handlers,
&rtems_filesystem_null_handlers /* for fifos */
&rtems_filesystem_handlers_default /* for fifos */
);
}
+3 -3
View File
@@ -54,8 +54,8 @@ int miniIMFS_initialize(
return IMFS_initialize_support(
mt_entry,
&miniIMFS_ops,
&rtems_filesystem_null_handlers, /* for memfiles */
&rtems_filesystem_null_handlers, /* for directories */
&rtems_filesystem_null_handlers /* for fifos */
&rtems_filesystem_handlers_default, /* for memfiles */
&rtems_filesystem_handlers_default, /* for directories */
&rtems_filesystem_handlers_default /* for fifos */
);
}
+1 -1
View File
@@ -1616,7 +1616,7 @@ unsigned long niu,siu;
case NFDIR: pathloc->handlers = &nfs_dir_file_handlers; break;
case NFREG: pathloc->handlers = &nfs_file_file_handlers; break;
case NFLNK: pathloc->handlers = &nfs_link_file_handlers; break;
default: pathloc->handlers = &rtems_filesystem_null_handlers; break;
default: pathloc->handlers = &rtems_filesystem_handlers_default; break;
}
pathloc->node_access = node;
+32 -32
View File
@@ -1292,21 +1292,21 @@ static int rtems_ftpfs_fstat(
static const rtems_filesystem_operations_table rtems_ftpfs_ops = {
.evalpath_h = rtems_ftpfs_eval_path,
.evalformake_h = NULL,
.link_h = NULL,
.unlink_h = NULL,
.evalformake_h = rtems_filesystem_default_evalformake,
.link_h = rtems_filesystem_default_link,
.unlink_h = rtems_filesystem_default_unlink,
.node_type_h = rtems_ftpfs_node_type,
.mknod_h = NULL,
.chown_h = NULL,
.mknod_h = rtems_filesystem_default_mknod,
.chown_h = rtems_filesystem_default_chown,
.freenod_h = rtems_ftpfs_free_node,
.mount_h = NULL,
.mount_h = rtems_filesystem_default_mount,
.fsmount_me_h = rtems_ftpfs_initialize,
.unmount_h = NULL,
.unmount_h = rtems_filesystem_default_unmount,
.fsunmount_me_h = rtems_ftpfs_unmount_me,
.utime_h = NULL,
.eval_link_h = NULL,
.symlink_h = NULL,
.readlink_h = NULL
.utime_h = rtems_filesystem_default_utime,
.eval_link_h = rtems_filesystem_default_evaluate_link,
.symlink_h = rtems_filesystem_default_symlink,
.readlink_h = rtems_filesystem_default_readlink
};
static const rtems_filesystem_file_handlers_r rtems_ftpfs_handlers = {
@@ -1314,31 +1314,31 @@ static const rtems_filesystem_file_handlers_r rtems_ftpfs_handlers = {
.close_h = rtems_ftpfs_close,
.read_h = rtems_ftpfs_read,
.write_h = rtems_ftpfs_write,
.ioctl_h = NULL,
.lseek_h = NULL,
.ioctl_h = rtems_filesystem_default_ioctl,
.lseek_h = rtems_filesystem_default_lseek,
.fstat_h = rtems_ftpfs_fstat,
.fchmod_h = NULL,
.fchmod_h = rtems_filesystem_default_fchmod,
.ftruncate_h = rtems_ftpfs_ftruncate,
.fpathconf_h = NULL,
.fsync_h = NULL,
.fdatasync_h = NULL,
.fcntl_h = NULL,
.rmnod_h = NULL
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_filesystem_default_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_filesystem_default_rmnod
};
static const rtems_filesystem_file_handlers_r rtems_ftpfs_root_handlers = {
.open_h = NULL,
.close_h = NULL,
.read_h = NULL,
.write_h = NULL,
.open_h = rtems_filesystem_default_open,
.close_h = rtems_filesystem_default_close,
.read_h = rtems_filesystem_default_read,
.write_h = rtems_filesystem_default_write,
.ioctl_h = rtems_ftpfs_ioctl,
.lseek_h = NULL,
.fstat_h = NULL,
.fchmod_h = NULL,
.ftruncate_h = NULL,
.fpathconf_h = NULL,
.fsync_h = NULL,
.fdatasync_h = NULL,
.fcntl_h = NULL,
.rmnod_h = NULL
.lseek_h = rtems_filesystem_default_lseek,
.fstat_h = rtems_filesystem_default_fstat,
.fchmod_h = rtems_filesystem_default_fchmod,
.ftruncate_h = rtems_filesystem_default_ftruncate,
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_filesystem_default_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_filesystem_default_rmnod
};
+30 -30
View File
@@ -1083,37 +1083,37 @@ static int rtems_tftp_free_node_info(
static const rtems_filesystem_operations_table rtems_tftp_ops = {
rtems_tftp_eval_path, /* eval_path */
rtems_tftp_evaluate_for_make, /* evaluate_for_make */
NULL, /* link */
NULL, /* unlink */
rtems_tftp_node_type, /* node_type */
NULL, /* mknod */
NULL, /* chown */
rtems_tftp_free_node_info, /* freenodinfo */
NULL, /* mount */
rtems_tftpfs_initialize, /* initialize */
NULL, /* unmount */
rtems_tftpfs_shutdown, /* fsunmount */
NULL, /* utime, */
NULL, /* evaluate_link */
NULL, /* symlink */
NULL, /* readlin */
.evalpath_h = rtems_tftp_eval_path,
.evalformake_h = rtems_tftp_evaluate_for_make,
.link_h = rtems_filesystem_default_link,
.unlink_h = rtems_filesystem_default_unlink,
.node_type_h = rtems_tftp_node_type,
.mknod_h = rtems_filesystem_default_mknod,
.chown_h = rtems_filesystem_default_chown,
.freenod_h = rtems_tftp_free_node_info,
.mount_h = rtems_filesystem_default_mount,
.fsmount_me_h = rtems_tftpfs_initialize,
.unmount_h = rtems_filesystem_default_unmount,
.fsunmount_me_h = rtems_tftpfs_shutdown,
.utime_h = rtems_filesystem_default_utime,
.eval_link_h = rtems_filesystem_default_evaluate_link,
.symlink_h = rtems_filesystem_default_symlink,
.readlink_h = rtems_filesystem_default_readlink
};
static const rtems_filesystem_file_handlers_r rtems_tftp_handlers = {
rtems_tftp_open, /* open */
rtems_tftp_close, /* close */
rtems_tftp_read, /* read */
rtems_tftp_write, /* write */
NULL, /* ioctl */
NULL, /* lseek */
NULL, /* fstat */
NULL, /* fchmod */
rtems_tftp_ftruncate, /* ftruncate */
NULL, /* fpathconf */
NULL, /* fsync */
NULL, /* fdatasync */
NULL, /* fcntl */
NULL /* rmnod */
.open_h = rtems_tftp_open,
.close_h = rtems_tftp_close,
.read_h = rtems_tftp_read,
.write_h = rtems_tftp_write,
.ioctl_h = rtems_filesystem_default_ioctl,
.lseek_h = rtems_filesystem_default_lseek,
.fstat_h = rtems_filesystem_default_fstat,
.fchmod_h = rtems_filesystem_default_fchmod,
.ftruncate_h = rtems_tftp_ftruncate,
.fpathconf_h = rtems_filesystem_default_fpathconf,
.fsync_h = rtems_filesystem_default_fsync,
.fdatasync_h = rtems_filesystem_default_fdatasync,
.fcntl_h = rtems_filesystem_default_fcntl,
.rmnod_h = rtems_filesystem_default_rmnod
};