1: /*
   2:  * Copyright (c) 1982, 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)mount.h	7.2.5 (2.11BSD GTE) 1997/6/29
   7:  */
   8: 
   9: /*
  10:  * file system statistics
  11:  */
  12: #include <sys/fs.h>
  13: 
  14: #define MNAMELEN 90 /* length of buffer for returned name */
  15: 
  16: struct statfs {
  17:     short   f_type;         /* type of filesystem (see below) */
  18:     u_short f_flags;        /* copy of mount flags */
  19:     short   f_bsize;        /* fundamental file system block size */
  20:     short   f_iosize;       /* optimal transfer block size */
  21:     daddr_t f_blocks;       /* total data blocks in file system */
  22:     daddr_t f_bfree;        /* free blocks in fs */
  23:     daddr_t f_bavail;       /* free blocks avail to non-superuser */
  24:     ino_t   f_files;        /* total file nodes in file system */
  25:     ino_t   f_ffree;        /* free file nodes in fs */
  26:     long    f_fsid[2];      /* file system id */
  27:     long    f_spare[5];     /* spare for later */
  28:     char    f_mntonname[MNAMELEN];  /* directory on which mounted */
  29:     char    f_mntfromname[MNAMELEN];/* mounted filesystem */
  30: };
  31: 
  32: /*
  33:  * File system types.  Since only UFS is supported the others are not
  34:  * specified at this time.
  35:  */
  36: #define MOUNT_NONE  0
  37: #define MOUNT_UFS   1   /* Fast Filesystem */
  38: #define MOUNT_MAXTYPE   1
  39: 
  40: #define INITMOUNTNAMES { \
  41:     "none",     /* 0 MOUNT_NONE */ \
  42:     "ufs",      /* 1 MOUNT_UFS */ \
  43:     0,                \
  44: }
  45: 
  46: /*
  47:  * Mount structure.
  48:  * One allocated on every mount.
  49:  * Used to find the super block.
  50:  */
  51: struct  mount
  52: {
  53:     dev_t   m_dev;      /* device mounted */
  54:     struct  fs m_filsys;    /* superblock data */
  55: #define m_flags m_filsys.fs_flags
  56:     struct  inode *m_inodp; /* pointer to mounted on inode */
  57:     struct  inode *m_qinod; /* QUOTA: pointer to quota file */
  58:     memaddr m_extern;   /* click address of mount table extension */
  59: };
  60: 
  61: struct  xmount
  62:     {
  63:     char    xm_mntfrom[MNAMELEN];   /* /dev/xxxx mounted from */
  64:     char    xm_mnton[MNAMELEN]; /* directory mounted on - this is the
  65: 					 * full(er) version of fs_fsmnt.
  66: 					*/
  67:     };
  68: 
  69: #define XMOUNTDESC  (((btoc(sizeof (struct xmount)) - 1) << 8) | RW)
  70: 
  71: /*
  72:  * Mount flags.
  73:  */
  74: #define MNT_RDONLY  0x0001      /* read only filesystem */
  75: #define MNT_SYNCHRONOUS 0x0002      /* file system written synchronously */
  76: #define MNT_NOEXEC  0x0004      /* can't exec from filesystem */
  77: #define MNT_NOSUID  0x0008      /* don't honor setuid bits on fs */
  78: #define MNT_NODEV   0x0010      /* don't interpret special files */
  79: #define MNT_QUOTA   0x0020      /* quotas are enabled on filesystem */
  80: #define MNT_ASYNC   0x0040      /* file system written asynchronously */
  81: #define MNT_NOATIME 0x0080      /* don't update access times */
  82: 
  83: /*
  84:  * Mask of flags that are visible to statfs().
  85: */
  86: #define MNT_VISFLAGMASK 0x0fff
  87: 
  88: /*
  89:  * filesystem control flags.  The high 4 bits are used for this.  Since NFS
  90:  * support will never be a problem we can avoid making the flags into a 'long.
  91: */
  92: #define MNT_UPDATE  0x1000      /* not a real mount, just an update */
  93: 
  94: /*
  95:  * Flags for various system call interfaces.
  96:  *
  97:  * These aren't used for anything in the system and are present only
  98:  * for source code compatibility reasons.
  99: */
 100: #define MNT_WAIT    1
 101: #define MNT_NOWAIT  2
 102: 
 103: #if defined(KERNEL) && !defined(SUPERVISOR)
 104: struct  mount mount[NMOUNT];
 105: #endif

Defined variables

Defined struct's

statfs defined in line 16; used 54 times
xmount defined in line 61; used 10 times

Defined macros

INITMOUNTNAMES defined in line 40; used 2 times
MNAMELEN defined in line 14; used 10 times
MNT_QUOTA defined in line 79; used 3 times
MNT_WAIT defined in line 100; never used
MOUNT_MAXTYPE defined in line 38; used 1 times
MOUNT_NONE defined in line 36; used 5 times
MOUNT_UFS defined in line 37; used 2 times
XMOUNTDESC defined in line 69; used 2 times

Usage of this include

Last modified: 1997-06-29
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3670
Valid CSS Valid XHTML 1.0 Strict