summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2010-07-15 08:46:06 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2010-07-15 08:46:06 +0000
commitde39b5127d773a9babc9fee51125c4a465ced86e (patch)
tree93b738b3398408643f783afe35e6a1517fa3fd37
parent2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-de39b5127d773a9babc9fee51125c4a465ced86e.tar.bz2
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.
-rw-r--r--cpukit/ChangeLog12
-rw-r--r--cpukit/libcsupport/Makefile.am2
-rw-r--r--cpukit/libcsupport/include/rtems/libio_.h1
-rw-r--r--cpukit/libcsupport/src/fs_null_handlers.c41
-rw-r--r--cpukit/libfs/src/imfs/imfs_creat.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_init.c2
-rw-r--r--cpukit/libfs/src/imfs/miniimfs_init.c6
-rw-r--r--cpukit/libfs/src/nfsclient/src/nfs.c2
-rw-r--r--cpukit/libnetworking/lib/ftpfs.c64
-rw-r--r--cpukit/libnetworking/lib/tftpDriver.c60
10 files changed, 81 insertions, 111 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 7ffbc1ec2a..6903abde32 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,17 @@
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
fields in rtems_libio_t.
* libcsupport/src/close.c, libcsupport/src/fcntl.c,
diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am
index a1f29ad112..c3150e7fa6 100644
--- a/cpukit/libcsupport/Makefile.am
+++ b/cpukit/libcsupport/Makefile.am
@@ -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
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
index cb9770faea..f5cb537210 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -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
diff --git a/cpukit/libcsupport/src/fs_null_handlers.c b/cpukit/libcsupport/src/fs_null_handlers.c
deleted file mode 100644
index 72c5b2c2b1..0000000000
--- a/cpukit/libcsupport/src/fs_null_handlers.c
+++ /dev/null
@@ -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 */
-};
diff --git a/cpukit/libfs/src/imfs/imfs_creat.c b/cpukit/libfs/src/imfs/imfs_creat.c
index 1bab553723..36ad0dfb46 100644
--- a/cpukit/libfs/src/imfs/imfs_creat.c
+++ b/cpukit/libfs/src/imfs/imfs_creat.c
@@ -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;
/*
diff --git a/cpukit/libfs/src/imfs/imfs_init.c b/cpukit/libfs/src/imfs/imfs_init.c
index 3ba9511b8c..c74d493b40 100644
--- a/cpukit/libfs/src/imfs/imfs_init.c
+++ b/cpukit/libfs/src/imfs/imfs_init.c
@@ -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 */
);
}
diff --git a/cpukit/libfs/src/imfs/miniimfs_init.c b/cpukit/libfs/src/imfs/miniimfs_init.c
index aa8110225f..b43a5318e8 100644
--- a/cpukit/libfs/src/imfs/miniimfs_init.c
+++ b/cpukit/libfs/src/imfs/miniimfs_init.c
@@ -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 */
);
}
diff --git a/cpukit/libfs/src/nfsclient/src/nfs.c b/cpukit/libfs/src/nfsclient/src/nfs.c
index ae50cd8b81..52eede17f1 100644
--- a/cpukit/libfs/src/nfsclient/src/nfs.c
+++ b/cpukit/libfs/src/nfsclient/src/nfs.c
@@ -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;
diff --git a/cpukit/libnetworking/lib/ftpfs.c b/cpukit/libnetworking/lib/ftpfs.c
index 892c1500be..918d6de571 100644
--- a/cpukit/libnetworking/lib/ftpfs.c
+++ b/cpukit/libnetworking/lib/ftpfs.c
@@ -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
};
diff --git a/cpukit/libnetworking/lib/tftpDriver.c b/cpukit/libnetworking/lib/tftpDriver.c
index 2b25f264e3..4122c3d96f 100644
--- a/cpukit/libnetworking/lib/tftpDriver.c
+++ b/cpukit/libnetworking/lib/tftpDriver.c
@@ -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
};