next up previous contents
Next: 4.7 Filters Up: 4. The FiST Language Previous: 4.5.2 State Functions

   
4.6 Variables

FiST variables begin with the $ character. The variable $$ refers to the file system being defined; i.e., the one that interposes. If this file system interposes on top of more than one other file system, then those file systems may be referred to using the positional variables $1, $2, $3, etc. If only one file system is being interposed upon, then $1 may be omitted.

The order for which a positional variable is assigned depends on the mounting options and the implementation. For example, when writing FiST code, using $1 will refer to the first mounted file system on the command line, $2 will refer to the second, etc. Changing which file system refers to which positional variable is as simple as mounting the file system with a different order of options.

To refer to a particular attribute of a vnode, the attribute keyword is appended to the positional parameter, separated by a period. For example:


next up previous contents
Next: 4.7 Filters Up: 4. The FiST Language Previous: 4.5.2 State Functions
Erez Zadok
1999-12-07