home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / mount.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  2.4 KB  |  86 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8. #ident    "@(#)head.sys:mount.h    1.4"
  9.  
  10. /*
  11.  *    Mount structure.
  12.  *    One allocated on every mount.
  13.  */
  14.  
  15. #ifndef DIRSIZ                /* REMOTE */
  16. #define DIRSIZ    14
  17. #endif
  18. #define    NMSZ    DIRSIZ + 1        /* size of advertised name */
  19.  
  20. struct    mount    {
  21.     ushort    m_flags;        /* status */
  22.     short    m_fstyp;        /* file system type */
  23.     long    m_bsize;        /* Block size of this fs */
  24.     dev_t    m_dev;            /* device mounted */
  25.     caddr_t    m_bufp;            /* buffer for super block */
  26.     struct inode *m_inodp;        /* pointer to mounted on inode */
  27.     struct inode *m_mount;        /* pointer to mount root inode */
  28.     ushort    m_rflags;        /* set for mount remotely  */
  29.     char    *m_name;        /* name advertised resource */
  30.     long    m_bcount;
  31. } ;
  32.  
  33. /* alloction flags (m_flags) */
  34.  
  35. #define    MFREE    0x0    /* Unused - free */
  36. #define    MINUSE    0x1    /* In use - fs mounted on this entry */
  37. #define    MINTER    0x2    /* Mount system call is using this entry */
  38. #define    MRDONLY    0x4    /* File system is mounted read only */
  39. #define MHADBAD    0x8    /* File system incurred a bad block */
  40.             /* so set s_state to FsBADBLK on umount */
  41.  
  42. #define    rdonlyfs(mp)    (((mp)->m_flags & MRDONLY) || (server() \
  43.                 && (srmount[u.u_mntindx].sr_flags & MRDONLY)))
  44.  
  45. /* remoteness flags (m_rflags) */
  46. /* (or'ed with m_flags in srmount, so must use different bits) */
  47.  
  48. #define MDOTDOT    0x20
  49. #define MFUMOUNT   0x40
  50. #define MLINKDOWN  0x80
  51. #define MCACHE     0x100    /* mount files are cacheable */
  52.  
  53. /* Flag bits passed to the mount system call */
  54. #define    MS_RDONLY    0x1    /* read only bit */
  55. #define    MS_FSS        0x2    /* Old (4-argument) mount (compatibility) */
  56. #define    MS_DATA        0x4    /* 6-argument mount */
  57. #define    MS_CACHE    0x8    /* RFS client caching */
  58.  
  59. #ifdef INKERNEL
  60. extern struct mount mount[];
  61. #endif
  62.  
  63. /* Server mount structure. Holds:
  64.  *    1. DOT-DOT
  65.  * connections.
  66.  *
  67.  * Search the table looking for (sysid, rootinode) pair.
  68.  */
  69.  
  70.  struct srmnt {
  71.     sysid_t sr_sysid;
  72.     ushort  sr_flags;
  73.     struct inode *sr_rootinode;    /* inode on server's machine */
  74.     int     sr_mntindx;        /* mount index of requestor  */
  75.     int     sr_refcnt;        /* number of open files      */
  76.     int    sr_dotdot;        /* for lbin mount, so .. works */
  77.     long    sr_bcount;
  78.     int    sr_slpcnt;
  79. } ;
  80. extern struct srmnt srmount[];
  81.  
  82. /* Return values if crossing mount point */
  83.  
  84. #define DOT_DOT    0x1
  85. #define MRDONLY    0x4
  86.