Gets a vfs file entry.
Standard C Library(libc.a)
#include <sys/vfs.h> #include <sys/vmount.h>
struct vfs_ent *getvfsent( )
struct vfs_ent *getvfsbytype( vfsType)
struct vfs_ent *getvfsbyname( vfsName)
struct vfs_ent *getvfsbyflag( vfsFlag)
void setvfsent( )
void endvfsent( )
Attention: All information is contained in a static area and so must be copied to be saved.
The getvfsent subroutine, when first called, returns a pointer to the first vfs_ent structure in the file. On the next call, it returns a pointer to the next vfs_ent structure in the file. Successive calls are used to search the entire file.
The vfs_ent structure is defined in the vfs.h file and it contains the following fields:
char vfsent_name; int vfsent_type; int vfsent_flags; char *vfsent_mnt_hlpr; char *vfsent_fs_hlpr;
The getvfsbytype subroutine searches from the beginning of the file until it finds a vfs type matching the vfsType parameter. The subroutine then returns a pointer to the structure in which it was found.
The getvfsbyname subroutine searches from the beginning of the file until it finds a vfs name matching the vfsName parameter. The search is made using flattened names; the search-string uses ASCII equivalent characters.
The getvfsbytype subroutine searches from the beginning of the file until it finds a type matching the vfsType parameter.
The getvfsbyflag subroutine searches from the beginning of the file until it finds the entry whose flag corresponds flags defined in the vfs.h file. Currently, these are VFS_DFLT_LOCAL and VFS_DFLT_REMOTE.
The setvfsent subroutine rewinds the vfs file to allow repeated searches.
The endvfsent subroutine closes the vfs file when processing is complete.
|vfsType||Specifies a vfs type.|
|vfsName||Specifies a vfs name.|
|vfsFlag||Specifies either VFS_DFLT_LOCAL or VFS_DFLT_REMOTE.|
The getvfsent, getvfsbytype, getvfsbyname, and getvfsbyflag subroutines return a pointer to a vfs_ent structure containing the broken-out fields of a line in the /etc/vfs file. If an end-of-file character or an error is encountered on reading, a null pointer is returned.
These subroutines are part of Base Operating System (BOS) Runtime.
|/etc/vfs||Describes the virtual file system (VFS) installed on the system.|
The getfsent, getfsspec, getfsfile, getfstype, setfsent, or endfsent (getfsent, getfsspec, getfsfile, getfstype, setfsent, or endfsent Subroutine) subroutine.
National Language Support Overview for Programming in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.