Mac Developer Library Developer
Search

 

This manual page is part of Xcode Tools version 5.0

To obtain these tools:

If you are running a version of Xcode Tools other than 5.0, view the documentation locally:

  • In Xcode

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • To learn how the manual is organized or to learn about command syntax, read the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Developer Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.




GETFSENT(3)              BSD Library Functions Manual              GETFSENT(3)

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

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <fstab.h>

     struct fstab *
     getfsent(void);

     struct fstab *
     getfsspec(const char *spec);

     struct fstab *
     getfsfile(const char *file);

     int
     setfsent(void);

     void
     endfsent(void);

DESCRIPTION
     The getfsent(), getfsspec(), and getfsfile() functions each return a pointer to an object with the fol-lowing following
     lowing 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 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 match-ing matching
     ing special file name or file system file name.

     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 ignored.

RETURN VALUES
     The getfsent(), 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.

FILES
     /etc/fstab

SEE ALSO
     fstab(5)

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

BUGS
     The data space used by these functions is thread-specific; if future use requires the data, it should
     be copied before any subsequent calls to these functions overwrite it.

BSD                              April 7, 2003                             BSD

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Feedback