man(1) Manual page archive


     GETFSENT(3)                                           GETFSENT(3)

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

     SYNOPSIS
          #include <fstab.h>

          struct fstab *getfsent()

          struct fstab *getfsspec(name)
          char *name;

          struct fstab *getfsfile(name)
          char *name;

          int setfsent()

          int endfsent()

     DESCRIPTION
          Getfsent, getfsspec and getfsfile each return a pointer to a
          structure containing the broken-out fields of a line in
          fstab(5), which describes mountable file systems.

          struct fstab {
                 char fs_spec[FSNMLG]; block device name
                 char fs_file[FSNMLG]; file system mount point
                 int fs_ftype;         file system type
                 int fs_flags;         file system flags
                 int fs_passno;        pass number for parallel fsck(8)
          };

          Type numbers and flags are listed in fmount(2). Entries that
          aren't file systems (should not be mounted) have negative
          values for `fs_ftype':

          `FSNONE'
                 (-1) Ignore this entry.
          `FSSWAP'
                 (-2) `fs_spec' is a device available for swapping.

          Getfsent reads the next line of the file, opening the file
          if necessary.

          Setfsent opens and rewinds the file.

          Endfsent closes the file.

          Getfsspec and getfsfile sequentially search from the begin-
          ning of the file until a matching special file name or file

     GETFSENT(3)                                           GETFSENT(3)

          system file name is found, or until EOF is encountered.

     FILES
          overwritten by each call.