GETFSENT(3,L) AIX Technical Reference GETFSENT(3,L)
-------------------------------------------------------------------------------
getfsent, getfsspec, getfsfile, getfstype, setfsent, endfsent
PURPOSE
Gets information about a file system.
LIBRARY
Standard C Library (libc.a)
SYNTAX
#include <fstab.h>
struct fstab *getfsent ( ) struct fstab *getfstype (type)
char *type;
struct fstab *getfsspec (spec) int setfsent ( )
char *spec;
struct fstab *getfsfile (file) int endfsent ( )
char *file
DESCRIPTION
The getfsent, getfsspec, getfstype, and getfsfile subroutines each return a
pointer to a structure which contains information about a file system. The
header file fstab.h describes the structure.
These routines are provided for 4.3BSD compatibility. Since AIX uses the file
/etc/filesystems rather than /etc/fstab, these routines expect a file as
described in "filesystems." They return a pointer to an fstab structure in the
static area, which must be copied if it is to be saved.
The getfsent subroutine reads the next record of the file, opening the file if
necessary.
The setfsent subroutine opens the file and positions to the first record.
Processed November 7, 1990 GETFSENT(3,L) 1
GETFSENT(3,L) AIX Technical Reference GETFSENT(3,L)
The endfsent subroutine closes a file.
The getfsspec and getfsfile subroutines sequentially search from the beginning
of the file until a matching special file name or file system file name is
found, or until the end of the file is encountered. The getfstype subroutine
does likewise, matching on the file system type field.
RETURN VALUE
If an end-of-file condition or an error is encountered on reading, subroutines
getfsent, getfsspec, getfsfile, and getfstype return a NULL pointer. The
subroutines setfsent and endfsent return 1 on success and 0 on error.
RELATED INFORMATION
"Introduction to International Character Support" in Managing the AIX Operating
System.
Processed November 7, 1990 GETFSENT(3,L) 2