summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs/imfs_fifo.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-02-24 17:08:06 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-03-13 12:24:16 +0100
commit699ac7c08f8e0f7f1a37144e9c316c0dd7a16175 (patch)
treef07bb6097b312586f45c0803c8d4a8464f8068a1 /cpukit/libfs/src/imfs/imfs_fifo.c
parentIMFS: New support functions (diff)
downloadrtems-699ac7c08f8e0f7f1a37144e9c316c0dd7a16175.tar.bz2
IMFS: Add and use node control
Add and use structure IMFS_node_control with support functions. This helps to make high level functions independent of the node type and reduces the number of branches in the code.
Diffstat (limited to '')
-rw-r--r--cpukit/libfs/src/imfs/imfs_fifo.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_fifo.c b/cpukit/libfs/src/imfs/imfs_fifo.c
index dc623629b6..616025669a 100644
--- a/cpukit/libfs/src/imfs/imfs_fifo.c
+++ b/cpukit/libfs/src/imfs/imfs_fifo.c
@@ -119,11 +119,7 @@ static off_t IMFS_fifo_lseek(
IMFS_FIFO_RETURN(err);
}
-/*
- * Handler table for IMFS FIFO nodes
- */
-
-const rtems_filesystem_file_handlers_r IMFS_fifo_handlers = {
+static const rtems_filesystem_file_handlers_r IMFS_fifo_handlers = {
IMFS_fifo_open,
IMFS_fifo_close,
IMFS_fifo_read,
@@ -136,3 +132,11 @@ const rtems_filesystem_file_handlers_r IMFS_fifo_handlers = {
rtems_filesystem_default_fsync_or_fdatasync,
rtems_filesystem_default_fcntl
};
+
+const IMFS_node_control IMFS_node_control_fifo = {
+ .imfs_type = IMFS_FIFO,
+ .handlers = &IMFS_fifo_handlers,
+ .node_initialize = IMFS_node_initialize_default,
+ .node_remove = IMFS_node_remove_default,
+ .node_destroy = IMFS_node_destroy_default
+};