GETFSENT(3X)
NAME
getfsent, getfsspec, getfsfile, getfstype, setfsent, endfsent − get file system descriptor file entry
HP-UX COMPATIBILITY
Level: Large Machine/HP Extension
Origin: HP and UCB
SYNOPSIS
#include <checklist.h>
struct checklist *getfsent()
struct checklist *getfsspec(spec)
char *spec;
struct checklist *getfsfile(file)
char *file;
struct checklist *getfstype(type)
char *type;
int setfsent()
int endfsent()
DESCRIPTION
Getfsent, getfsspec, getfsfile, and getfstype each return a pointer to an object with the following structure containing the broken-out fields of a line in the /etc/checklist file. The structure is declared in the <checklist.h> header file:
struct checklist{
char*fs_spec; /* special file name */
char*fs_bspec; /* block special file name */
char*fs_file; /* file sys directory name */
char*fs_type; /* type: ro, rw, sw, xx */
intfs_passno; /* fsck pass number */
intfs_freq; /* backup frequency */
};
The fields have meanings described in checklist(5). If the block special file name, the file system directory name, the type and the pass number are not all defined on the associated line in /etc/checklist, these routines will return pointers to NULL in the fs_bspec, fs_file and fs_type fields and -1 in the fs_passno field. Fs_freq is reserved for future use. If the fs_freq field is not present on the line these routines will return -1 in the fs_freq field.
Getfsent reads the next line of the file, opening the file if necessary.
Setfsent opens and rewinds the file.
Endfsent closes the file.
Getfsspec and getfsfile sequentially search from the beginning of the file until a matching special file name or file system file name is found, or until EOF is encountered. Getfstype does likewise, matching on the file system type field.
FILES
/etc/checklist
SEE ALSO
DIAGNOSTICS
Null pointer (0) returned on EOF, invalid entry or error.
BUGS
All information is contained in a static area so it must be copied if it is to be saved.
Hewlett-Packard — last mod. May 11, 2021