GETFSENT(3X) — HP-UX
NAME
getfsent, getfsspec, getfsfile, getfstype, setfsent, endfsent − get file system descriptor file entry
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
These routines are included for compatibility with 4.2 BSD; they have been superseded by the getmntent(3X) library routines.
Getfsent, getfsspec, getfsfile, and getfstype each returns 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_dir; | /* file sys directory name */ | |
| char | *fs_type; | /* type: ro, rw, sw, xx */ | |
| int | fs_passno; | /* fsck pass number */ | |
| int | fs_freq; | /* backup frequency */ |
};
The fields have meanings described in checklist(4). If the block special file name, the file system directory name, and the type are not all defined on the associated line in /etc/checklist, these routines will return pointers to NULL in the fs_bspec, fs_dir and fs_type fields. If the pass number or the backup frequency field are not present on the line, these routines will return −1 in the corresponding structure member. Fs_freq is reserved for future use.
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.
DIAGNOSTICS
A null pointer is returned on EOF, invalid entry or error.
WARNINGS
Since all information is contained in a static area, it must be copied to be saved.
AUTHOR
Getfsent was developed by HP and the University of California, Berkeley.
FILES
/etc/checklist
SEE ALSO
Hewlett-Packard Company — May 11, 2021