home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / mnttab.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.4 KB  |  52 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_MNTTAB_H
  11. #define _SYS_MNTTAB_H
  12.  
  13. #ident    "@(#)/usr/include/sys/mnttab.h.sl 1.1 4.0 12/08/90 33017 AT&T-USL"
  14.  
  15. #define    MNTTAB    "/etc/mnttab"
  16. #define    MNT_LINE_MAX    1024
  17.  
  18. #define    MNT_TOOLONG    1    /* entry exceeds MNT_LINE_MAX */
  19. #define    MNT_TOOMANY    2    /* too many fields in line */
  20. #define    MNT_TOOFEW    3    /* too few fields in line */
  21.  
  22. #define    mntnull(mp)\
  23.     ((mp)->mnt_special = (mp)->mnt_mountp =\
  24.      (mp)->mnt_fstype = (mp)->mnt_mntopts =\
  25.      (mp)->mnt_time = NULL)
  26.  
  27. #define    putmntent(fd, mp)\
  28.     fprintf((fd), "%s\t%s\t%s\t%s\t%s\n",\
  29.         (mp)->mnt_special ? (mp)->mnt_special : "-",\
  30.         (mp)->mnt_mountp ? (mp)->mnt_mountp : "-",\
  31.         (mp)->mnt_fstype ? (mp)->mnt_fstype : "-",\
  32.         (mp)->mnt_mntopts ? (mp)->mnt_mntopts : "-",\
  33.         (mp)->mnt_time ? (mp)->mnt_time : "-")
  34.  
  35. struct mnttab {
  36.     char    *mnt_special;
  37.     char    *mnt_mountp;
  38.     char    *mnt_fstype;
  39.     char    *mnt_mntopts;
  40.     char    *mnt_time;
  41. };
  42.  
  43. #ifdef __STDC__
  44. extern int    getmntent(FILE *, struct mnttab *);
  45. extern int    getmntany(FILE *, struct mnttab *, struct mnttab *);
  46. #else
  47. extern int    getmntent();
  48. extern int    getmntany();
  49. #endif
  50.  
  51. #endif    /* _SYS_MNTTAB_H */
  52.