VxWorks Reference Manual : Libraries

passFsLib

NAME

passFsLib - pass-through (to UNIX) file system library (VxSim)

ROUTINES

passFsDevInit( ) - associate a device with passFs file system functions
passFsInit( ) - prepare to use the passFs library

DESCRIPTION

This module is only used with VxSim simulated versions of VxWorks.

This library provides services for file-oriented device drivers to use the UNIX file standard. This module takes care of all the buffering, directory maintenance, and file system details that are necessary. In general, the routines in this library are not to be called directly by users, but rather by the VxWorks I/O System.

INITIALIZING PASSFSLIB

Before any other routines in passFsLib can be used, the routine passFsInit( ) must be called to initialize this library. The passFsDevInit( ) routine associates a device name with the passFsLib functions. The parameter expected by passFsDevInit( ) is a pointer to a name string, to be used to identify the volume/device. This will be part of the pathname for I/O operations which operate on the device. This name will appear in the I/O system device table, which may be displayed using the iosDevShow( ) routine.

As an example:

    passFsInit (1);
    passFsDevInit ("host:");
After the passFsDevInit( ) call has been made, when passFsLib receives a request from the I/O system, it calls the UNIX I/O system to service the request. Only one volume may be created.

READING DIRECTORY ENTRIES

Directories on a passFs volume may be searched using the opendir( ), readdir( ), rewinddir( ), and closedir( ) routines. These calls allow the names of files and sub-directories to be determined.

To obtain more detailed information about a specific file, use the fstat( ) or stat( ) function. Along with standard file information, the structure used by these routines also returns the file attribute byte from a passFs directory entry.

FILE DATE AND TIME

UNIX file date and time are passed though to VxWorks.

INCLUDE FILES

passFsLib.h

SEE ALSO

passFsLib, ioLib, iosLib, dirLib, ramDrv


Libraries : Routines

passFsDevInit( )

NAME

passFsDevInit( ) - associate a device with passFs file system functions

SYNOPSIS

void *passFsDevInit
    (
    char * devName /* device name */
    )

DESCRIPTION

This routine associates the name devName with the file system and installs it in the I/O System's device table. The driver number used when the device is added to the table is that which was assigned to the passFs library during passFsInit( ).

RETURNS

A pointer to the volume descriptor, or NULL if there is an error.

SEE ALSO

passFsLib


Libraries : Routines

passFsInit( )

NAME

passFsInit( ) - prepare to use the passFs library

SYNOPSIS

STATUS passFsInit
    (
    int nPassfs /* number of pass-through file systems */
    )

DESCRIPTION

This routine initializes the passFs library. It must be called exactly once, before any other routines in the library. The argument specifies the number of passFs devices that may be open at once. This routine installs passFsLib as a driver in the I/O system driver table, allocates and sets up the necessary memory structures, and initializes semaphores.

Normally this routine is called from the root task, usrRoot( ), in usrConfig( ). This initialization is enabled when the configuration macro INCLUDE_PASSFS is defined.

NOTE

Maximum number of pass-through file systems is 1.

RETURNS

OK, or ERROR.

SEE ALSO

passFsLib