4BSD/usr/man/man3/getfsent.3

Compare this file to the similar file:
Show the results in this format:

.TH GETFSENT 3 
.UC 4
.SH NAME
getfsent, getfsspec, getfsfile, setfsent, endfsent \- get file system descriptor file entry
.SH SYNOPSIS
.nf
.B #include <fstab.h>
.PP
.B struct fstab *getfsent()
.PP
.B struct fstab *getfsspec(name)
.B char *name;
.PP
.B struct fstab *getfsfile(name)
.B char *name;
.PP
.B int setfsend()
.PP
.B int endfsent()
.fi
.SH DESCRIPTION
.I Getfsent,
.I getfsspec
and
.I getfsfile
each return a pointer to an object with the
following structure
containing the broken-out
fields of a line in the file system description file,
.I /usr/include/fstab.h.
.RS
.PP
.nf
#define	FSNMLG	16

struct fstab{
	char	fs_spec[FSNMLG];
	char	fs_file[FSNMLG];
	char	fs_type[3];
	int	fs_freq;
	int	fs_passno;
};
.ft R
.ad
.fi
.RE
.PP
The fields have meanings described in
.IR fstab (5).
.PP
.I Getfsent
reads the next line of the file, opening the file if necessary.
.PP
.I Setfsent
opens and rewinds the file.
.PP
.I Endfsent
closes the file.
.PP
.I Getfsspec
and
.I 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.
.SH FILES
/etc/fstab
.SH "SEE ALSO"
fstab(5)
.SH DIAGNOSTICS
Null pointer
(0) returned on EOF or error.
.SH BUGS
All information
is contained in a static area
so it must be copied if it is
to be saved.