.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\" %sccs.include.redist.man%
.\" @(#)getfsent.3 8.1 (Berkeley) %G%
.Nd get file system descriptor file entry
.Fn getfsspec "const char *spec"
.Fn getfsfile "const char *file"
each return a pointer to an object with the following structure
containing the broken-out fields of a line in the file system
.Bd -literal -offset indent
char *fs_spec; /* block special device name */
char *fs_file; /* file system path prefix */
char *fs_vfstype; /* type of file system */
char *fs_mntops; /* comma separated mount options */
char *fs_type; /* rw, ro, sw, or xx */
int fs_freq; /* dump frequency, in days */
int fs_passno; /* pass number on parallel dump */
The fields have meanings described in
opens the file (closing any previously opened file) or rewinds it
search the entire file (opening it if necessary) for a matching special
file name or file system file name.
For programs wishing to read the entire database,
reads the next entry (opening the file if necessary).
All entries in the file with a type field equivalent to
return a null pointer (0) on
returns 0 on failure, 1 on success.
.Bl -tag -width /etc/fstab -compact
These functions use static data storage;
if the data is needed for future use, it should be
copied before any subsequent calls overwrite it.