Changeset 5b34e7a in rtems


Ignore:
Timestamp:
Jan 16, 2014, 12:05:13 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
e16a7ba
Parents:
45e82bb8
git-author:
Sebastian Huber <sebastian.huber@…> (01/16/14 12:05:13)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/21/14 12:22:52)
Message:

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.

Location:
cpukit/libfs/src/imfs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/imfs/imfs.h

    r45e82bb8 r5b34e7a  
    981981)
    982982{
    983   const IMFS_jnode_t *node = (const IMFS_jnode_t *) loc->node_access;
    984 
    985   return IMFS_generic_get_context_by_node( node );
     983  return loc->node_access_2;
    986984}
    987985
  • cpukit/libfs/src/imfs/imfs_eval.c

    r45e82bb8 r5b34e7a  
    135135          ++entry->reference_count;
    136136          currentloc->node_access = entry;
     137          currentloc->node_access_2 =
     138            IMFS_generic_get_context_by_node( entry );
    137139          IMFS_Set_handlers( currentloc );
    138140
Note: See TracChangeset for help on using the changeset viewer.