RTEMS Logo

RTEMS 4.9.5 On-Line Library


The rtems_filesystem_location_info_t Structure

PREV UP next Bookshelf RTEMS Filesystem Design Guide

1.3: The rtems_filesystem_location_info_t Structure

The rtems_filesystem_location_info_t structure contains all information necessary for identification of a node.

The generic rtems filesystem code defines two global rtems_filesystem_location_info_t structures, the rtems_filesystem_root and the rtems_filesystem_current. Both are initially defined to be the root node of the base filesystem. Once the chdir command is correctly used the rtems_filesystem_current is set to the location specified by the command.

The filesystem generic code peeks at the first character in the name to be evaluated. If this character is a valid seperator, the rtems_filesystem_root is used as the node to start the evaluation with. Otherwise, the rtems_filesystem_current node is used as the node to start evaluating with. Therefore, a valid rtems_filesystem_location_info_t is given to the evaluate routine to start evaluation with. The evaluate routines are then responsible for making any changes necessary to this structure to correspond to the name being parsed.

struct rtems_filesystem_location_info_tt {
    void                                     *node_access;
    rtems_filesystem_file_handlers_r         *handlers;
    rtems_filesystem_operations_table        *ops;
    rtems_filesystem_mount_table_entry_t     *mt_entry;
};
node_access
This element is filesystem specific. A filesystem can define and store any information necessary to identify a node at this location. This element is normally filled in by the filesystem's evaluate routine. For the filesystem's root node, the filesystem's initilization routine should fill this in, and it should remain valid until the instance of the filesystem is unmounted.
handlers
This element is defined as a set of routines that may change within a given filesystem based upon node type. For example a directory and a memory file may have to completely different read routines. This element is set to an initialization state defined by the mount table, and may be set to the desired state by the evaluation routines.
ops
This element is defined as a set of routines that remain static for the filesystem. This element identifies entry points into the filesystem to the generic code.
mt_entry
This element identifies the mount table entry for this instance of the filesystem.


PREV UP next Bookshelf RTEMS Filesystem Design Guide

Copyright © 1988-2008 OAR Corporation