summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs/imfs.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-01-16 13:05:13 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-01-21 13:22:52 +0100
commit5b34e7ada4c9645cbfaf855d9b9300fa3075bff5 (patch)
tree5e297e5a65510e3752de6cf3c3c3b9fe24287559 /cpukit/libfs/src/imfs/imfs.h
parentIMFS: Allow sockets as generic nodes (diff)
downloadrtems-5b34e7ada4c9645cbfaf855d9b9300fa3075bff5.tar.bz2
IMFS: Improved support for generic nodes
The rtems_filesystem_location_info_t::node_access_2 was unused by the IMFS. Use it to hold the context of generic nodes. This makes it possible to use node handlers for objects with and without a corresponding file system node. For example network sockets created with socket() have only a file descriptor, but no corresponding file system node. The UNIX(4) domain sockets can be bound to file system nodes. In both cases the rtems_filesystem_location_info_t must provide a pointer to the socket structure used by the socket node handlers. With the context pointer (for sockets, this is the socket structure) in rtems_filesystem_location_info_t::node_access_2 the same node handlers can be used in both cases.
Diffstat (limited to 'cpukit/libfs/src/imfs/imfs.h')
-rw-r--r--cpukit/libfs/src/imfs/imfs.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h
index f4025ebc5a..cdf4cf9d3e 100644
--- a/cpukit/libfs/src/imfs/imfs.h
+++ b/cpukit/libfs/src/imfs/imfs.h
@@ -980,9 +980,7 @@ static inline void *IMFS_generic_get_context_by_location(
const rtems_filesystem_location_info_t *loc
)
{
- const IMFS_jnode_t *node = (const IMFS_jnode_t *) loc->node_access;
-
- return IMFS_generic_get_context_by_node( node );
+ return loc->node_access_2;
}
static inline void *IMFS_generic_get_context_by_iop(