Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getmntent(3C) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mnttab(4)



getmntent(3C)                    UNIX System V                    getmntent(3C)


NAME
      getmntent, getmntany - get mnttab file entry

SYNOPSIS
      #include <stdio.h>
      #include <sys/mnttab.h>

      int getmntent (FILE *fp, struct mnttab *mp);

      int getmntany (FILE *fp, struct mnttab *mp, struct mnttab *mpref);

DESCRIPTION
      getmntent and getmntany each fill in the structure pointed to by mp with
      the broken-out fields of a line in the /etc/mnttab file.  Each line in
      the file contains a mnttab structure, declared in the sys/mnttab.h header
      file:

            struct mnttab {
                  char  *mntspecial;
                  char  *mntmountp;
                  char  *mntfstype;
                  char  *mntmntopts;
                  char  *mnttime;
            };


      The fields have meanings described in mnttab(4).

      getmntent returns a pointer to the next mnttab structure in the file; so
      successive calls can be used to search the entire file.  getmntany
      searches the file referenced by fp until a match is found between a line
      in the file and mpref.  mpref matches the line if all non-null entries in
      mpref match the corresponding fields in the file.  Note that these
      routines do not open, close, or rewind the file.

FILES
      /etc/mnttab

SEE ALSO
      mnttab(4).

DIAGNOSTICS
      If the next entry is successfully read by getmntent or a match is found
      with getmntany, 0 is returned.  If an end-of-file is encountered on
      reading, these functions return -1.  If an error is encountered, a value
      greater than 0 is returned.  The possible error values are:

      MNTTOOLONG         A line in the file exceeded the internal buffer size
                          of MNTLINEMAX.





10/89                                                                    Page 1







getmntent(3C)                    UNIX System V                    getmntent(3C)


      MNTTOOMANY         A line in the file contains too many fields.

      MNTTOOFEW          A line in the file contains too few fields.

NOTES
      The members of the mnttab structure point to information contained in a
      static area, so it must be copied if it is to be saved.















































Page 2                                                                    10/89





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026