next up previous contents
Next: 4.5.1 Errors Up: 4. The FiST Language Previous: 4.4 FiST Vnode Attributes

   
4.5 FiST Vnode Functions

Each vnode or VFS has a set of operations that can be applied to it. The most obvious are %vn_op and %vfs_op. Here, op refers to the respective Vnode and VFS operations as described in Appendices sec-appendix-vnode-vnodeops and sec-appendix-vnode-vfsops. For example, %vn_getattr refers to the vnode operation ``get attributes,'' and %vfs_statvfs refers to the VFS operation ``get file system statistics.''

It is often useful to refer to a group of vnode operations as a whole. Generally, a user who wants to perform an operation on one type of data will want that operation to be applied everywhere the same type of data object is used. For example, in Envfs (Appendix sec-appendix-typical-in-core-envfs) environment variables in pathnames should be expanded everywhere pathnames are used, not just, say, in the vn_open function. FiST provides meta-function operators that start with %vn_op and %vfs_op. These meta-functions are listed in Table tab-fist-func-meta.


 
Table: FiST Meta Functions
Vnode Meta-Function VFS Meta-Function Meaning
%vn_op_all %vfs_op_all all operations
%vn_op_construct %vfs_op_construct operations that create new vnodes
%vn_op_destroy %vfs_op_destroy operations that delete existing ones
%vn_op_read %vfs_op_read operations that read values
%vn_op_write %vfs_op_write operations that write values
%vn_op_pathname %vfs_op_pathname operations that manipulate path names
%vn_op_this %vfs_op_this The current operation being executed
 



 
next up previous contents
Next: 4.5.1 Errors Up: 4. The FiST Language Previous: 4.4 FiST Vnode Attributes
Erez Zadok
1999-12-07