Changeset 10c1bef in rtems


Ignore:
Timestamp:
Oct 26, 1999, 3:42:10 PM (20 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
e54a7d33
Parents:
66a8c6f
Message:

Added information on the evaluate and evaluate for make routines.
Added details on how generic code starts the pathevaluation process.

Location:
doc/filesystem
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/filesystem/fsrequirements.t

    r66a8c6f r10c1bef  
    327327@subheading Corresponding Structure Element:
    328328
    329 XXX
    330 
    331 @subheading Arguments:
    332 
    333 XXX
    334 
    335 @subheading Description:
    336 
    337 XXX
    338 
     329evalpath
     330
     331@subheading Arguments:
     332
     333@example
     334  const char                        *pathname,      /* IN     */
     335  int                                flags,         /* IN     */
     336  rtems_filesystem_location_info_t  *pathloc        /* IN/OUT */
     337@end example
     338
     339@subheading Description:
     340
     341This routine is responsible for evaluating the pathname passed in
     342based upon the flags and the valid @code{rthems_filesystem_location_info_t}.
     343Additionally, it must make any changes to pathloc necessary to identify
     344the pathname node.  This should include calling the evalpath for a mounted
     345filesystem, if the given filesystem supports the mount command. 
     346
     347This routine returns a 0 if the evaluation was successful.
     348Otherwise, it returns a -1 and sets errno to the correct error.
     349
     350This routine is required and should NOT be set to NULL.
    339351
    340352@c
     
    347359@subheading Corresponding Structure Element:
    348360
    349 XXX
    350 
    351 @subheading Arguments:
    352 
    353 XXX
    354 
    355 @subheading Description:
    356 
    357 XXX
    358 
     361evalformake
     362
     363@subheading Arguments:
     364
     365@example
     366   const char                       *path,       /* IN */
     367   rtems_filesystem_location_info_t *pathloc,    /* IN/OUT */
     368   const char                      **name        /* OUT    */
     369@end example
     370
     371@subheading Description:
     372
     373This method is given a path to evaluate and a valid start location.  It
     374is responsible for finding the parent node for a requested make command,
     375setting pathloc information to identify the parent node, and setting
     376the name pointer to the first character of the name of the new node.
     377Additionally, if the filesystem supports the mount command, this method
     378should call the evalformake routine for the mounted filesystem.
     379
     380This routine returns a 0 if the evaluation was successful.  Otherwise, it
     381returns a -1 and sets errno to the correct error.
     382
     383This routine is required and should NOT be set to NULL.  However, if
     384the filesystem does not support user creation of a new node, it may
     385set errno to ENOSYS and return -1.
    359386
    360387@c
     
    388415The name of the link will be normalized to remove extraneous separators from
    389416the end of the name.
     417
     418This routine is not required and may be set to NULL.
    390419
    391420@c
  • doc/filesystem/patheval.t

    r66a8c6f r10c1bef  
    99@chapter Pathname Evaluation
    1010
     11This chapter describes the pathname evaluation process for the
     12RTEMS Filesystem Infrastructure.
     13
     14@example
    1115XXX Include graphic of the path evaluation process with Jennifer's
    12 explanations
     16XXX explanations
     17@end example
    1318
    14 @itemize @bullet
     19@section Pathname Evaluation Handlers
    1520
    16 @item There are two pathname evaluation routines.  The handler patheval()
     21There are two pathname evaluation routines.  The handler patheval()
    1722is called to find, verify privlages on and return information on a node
    1823that exists.  The handler evalformake() is called to find, verify
     
    2126the new node to be created.
    2227
    23 @item Pathname evaluation is specific to a filesystem
     28Pathname evaluation is specific to a filesystem. 
     29Each filesystem is required to provide both a patheval() and an evalformake()
     30routine.  Both of these routines gets a name to evaluate and a node indicating
     31where to start the evaluation. 
    2432
    25 @item Mechanics of crossing a mount point during the evaluation of a path
    26 name
     33@section Crossing a Mount Point During Path Evaluation
    2734
    28 @item Role of rtems_filesystem_location_info_t structure
    29 
    30 @itemize @bullet
    31 
    32 @item Finding filesystem node information
    33 
    34 @item Finding filesystem node handlers
    35 
    36 @item Finding filesystem node operations table
    37 
    38 @item Finding mount table entry for the filesystem that this node is part
    39 of
    40 
    41 @end itemize
    42 
    43 @end itemize
     35If the filesystem supports the mount command, the evaluate routines
     36must handle crossing the mountpoint.  The evaluate routine should evaluate
     37the name upto the first directory node where the new filesystem is mounted. 
     38The filesystem may process terminator characters prior to calling the
     39evaluate routine for the new filesystem.   A pointer to the portion of the
     40name which has not been evaluated along with the root node of the new
     41file system ( gotten from the mount table entry ) is passed to the correct
     42mounted filesystem evaluate routine.
    4443
    4544
     45@section The rtems_filesystem_location_info_t Structure
     46
     47The @code{rtems_filesystem_location_info_t} structure contains all information
     48necessary for identification of a node. 
     49
     50The generic rtems filesystem code defines two global
     51rtems_filesystem_location_info_t structures, the
     52@code{rtems_filesystem_root} and the @code{rtems_filesystem_current}.
     53Both are initially defined to be the root node of the base filesystem.
     54Once the chdir command is correctly used the @code{rtems_filesystem_current}
     55is set to the location specified by the command.
     56
     57The filesystem generic code peeks at the first character in the name to be
     58evaluated.  If this character is a valid seperator, the
     59@code{rtems_filesystem_root} is used as the node to start the evaluation
     60with.  Otherwise, the @code{rtems_filesystem_current} node is used as the
     61node to start evaluating with.  Therefore, a valid
     62rtems_filesystem_location_info_t is given to the evaluate routine to start
     63evaluation with.  The evaluate routines are then responsible for making
     64any changes necessary to this structure to correspond to the name being
     65parsed.
     66
     67@example
     68struct rtems_filesystem_location_info_tt @{
     69    void                                     *node_access;
     70    rtems_filesystem_file_handlers_r         *handlers;
     71    rtems_filesystem_operations_table        *ops;
     72    rtems_filesystem_mount_table_entry_t     *mt_entry;
     73@};
     74@end example
     75
     76@table @b
     77
     78@item node_access
     79This element is filesystem specific.  A filesystem can define and store
     80any information necessary to identify a node at this location.  This element
     81is normally filled in by the filesystem's evaluate routine. For the
     82filesystem's root node, the filesystem's initilization routine should
     83fill this in, and it should remain valid until the instance of the
     84filesystem is unmounted.
     85
     86@item handlers
     87This element is defined as a set of routines that may change within a
     88given filesystem based upon node type.  For example a directory and a
     89memory file may have to completely different read routines.  This element
     90is set to an initialization state defined by the mount table, and may
     91be set to the desired state by the evaluation routines.
     92
     93@item ops
     94This element is defined as a set of routines that remain static for the
     95filesystem.  This element identifies entry points into the filesystem
     96to the generic code.
     97
     98@item mt_entry
     99This element identifies the mount table entry for this instance of the
     100filesystem.
     101
     102@end table
     103
     104
     105
     106
     107
     108
     109
     110
Note: See TracChangeset for help on using the changeset viewer.