Next Previous Contents

3.2 Filesystem specific and global parameters

Filesystem specific parameter is described by struct user_parameter defined in fslib.h. Each parameter has its ID (it needn't be unique across different filesystem types), user readable name, type of contained value (INTERVAL, BOOLEAN, STRING, DISCRETE_STRING, and DISCRETE_NUMBER), type flags (see fslib.h for details), and value. See fslib.h for definition of each type.

For discrete parameters (UPT_DISCRETE_STRING and UPT_DISCRETE_NUMBER) the pointers to arrays of possible parameter values are set to the same array for all the parameters of the same type, e.g. for parameters for the same type of the same filesystem. Thus it is sufficient (and only possible without resulting in error) to deallocate only arrays in record rs_fspars.

The library allows to specify filesystem specific parameters for newly created filesystems. Function get_resources() provides information about current filesystems. Function commit_disks expects parameters for partitions to create - if ommited their values will be set to their defaults.

There are three places where parameters structure (struct user_parameter) are found. Each of them is listed below:

Any of filesystem specific parameter can be unset; in that case the parameter will be set by the library to its default (its value will not be returned when function called just for checking). The structure of UPT_DISCRETE_STRING and UPT_DISCRETE_NUMBER type parameter should contain pointers to the arrays of their possible values (it is not necessary and even not recommended to copy values from the arrays returned by function get_resources to any newly allocated memory location; it is enough to use pointers to arrays in structures returned by function get_resources).

Next Previous Contents