*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> endfsent (3)              



NAME    [Toc]    [Back]

     getfsent, getfsspec, getfsfile, setfsent, endfsent - get file system
     descriptor file entry

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <fstab.h>

     struct fstab *

     struct fstab *
     getfsspec(const char *spec);

     struct fstab *
     getfsfile(const char *file);



DESCRIPTION    [Toc]    [Back]

     The getfsent(), getfsspec(), and getfsfile() functions each return a
     pointer to an object with the following structure containing the brokenout
 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;    /* 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 fstab(5).

     The setfsent() function opens the file (closing any previously opened
     file) or rewinds it if it is already open.

     The endfsent() function closes the file.

     The getfsspec() and getfsfile() functions search the entire file (opening
     it if necessary) for a matching special file name or file system file

     For programs wishing to read the entire database, getfsent() reads the
     next entry (opening the file if necessary).

     All entries in the file with a type field equivalent to FSTAB_XX are

RETURN VALUES    [Toc]    [Back]

     The getfsent(), getfsspec(), and getfsfile() functions return a null
     pointer (0) on EOF or error.  The setfsent() function returns 0 on failure,
 1 on success.  The endfsent() function returns nothing.

FILES    [Toc]    [Back]


SEE ALSO    [Toc]    [Back]


HISTORY    [Toc]    [Back]

     The getfsent() function appeared in 4.0BSD; the endfsent(), getfsfile(),
     getfsspec(), and setfsent() functions appeared in 4.3BSD.

BUGS    [Toc]    [Back]

     These functions use static data storage; if the data is needed for future
     use, it should be copied before any subsequent calls overwrite it.

BSD                              June 4, 1993                              BSD
[ Back ]
 Similar pages
Name OS Title
fattach Tru64 Attach a STREAMS-based file descriptor to a file in the file system name space
fdetach Tru64 Detach a STREAMS-based file descriptor from a file in the file system name space
mount_fdesc OpenBSD mount the file-descriptor file system
fdescfs FreeBSD file-descriptor file system
pxfisatty IRIX Determines if file descriptor corresponds to a valid file descriptor
AFopenfile IRIX allocate an AFfilehandle structure for an audio file identified by name / by a Unix file descriptor
AFidentifyfd IRIX retrieve the audio file format of a file descriptor / open AFfilehandle
dirent IRIX file system independent directory entry
fdetach Tru64 Detaches a STREAMS-based file descriptor from a file
isfdtype Tru64 Test a file descriptor for a specific file type
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service