|
NAMEgetfsent , getfsspec ,
getfsfile , setfsent ,
endfsent —
get file system descriptor file entry
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <fstab.h>
struct fstab *
struct fstab *
struct fstab *
int
void
void
const char *
DESCRIPTIONThegetfsent (), getfsspec (), and
getfsfile () functions 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,
<fstab.h> .
struct fstab { char *fs_spec; /* block special device name */ char *fs_file; /* file system path prefix */ char *fs_vfstype; /* File system type, ufs, nfs */ char *fs_mntops; /* Mount options ala -o */ char *fs_type; /* FSTAB_* from fs_mntops */ int fs_freq; /* dump frequency, in days */ int fs_passno; /* pass number on parallel fsck */ }; The fields have meanings described in fstab(5). The The The The The For programs wishing to read the entire database,
All entries in the file with a type field equivalent to
RETURN VALUESThegetfsent (), getfsspec (), and
getfsfile () functions return a
NULL pointer on EOF or error.
The setfsent () function returns 0 on failure, 1 on
success. The endfsent () function returns nothing.
ENVIRONMENT
FILES
SEE ALSOfstab(5)HISTORYThegetfsent () function appeared in
4.0BSD; the endfsent (),
getfsfile (), getfsspec (), and
setfsent () functions appeared in
4.3BSD; the setfstab () and
getfstab () functions appeared in
FreeBSD 5.1.
BUGSThese functions use static data storage; if the data is needed for future use, it should be copied before any subsequent calls overwrite it.
Visit the GSP FreeBSD Man Page Interface. |