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 / fs / s5filsys.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  1.7 KB  |  50 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:fs/s5filsys.h    1.3"
  9.  
  10. /*
  11.  *    Structure of the super-block.
  12.  */
  13.  
  14. struct    filsys
  15. {
  16.     ushort    s_isize;    /* size in blocks of i-list */
  17.     daddr_t    s_fsize;    /* size in blocks of entire volume */
  18.     short    s_nfree;    /* number of addresses in s_free */
  19.     daddr_t    s_free[NICFREE];/* free block list */
  20.     short    s_ninode;    /* number of i-nodes in s_inode */
  21.     ushort    s_inode[NICINOD];/* free i-node list */
  22.     char    s_flock;    /* lock during free list manipulation */
  23.     char    s_ilock;    /* lock during i-list manipulation */
  24.     char      s_fmod;     /* super block modified flag */
  25.     char    s_ronly;    /* mounted read-only flag */
  26.     time_t    s_time;     /* last super block update */
  27.     short    s_dinfo[4];    /* device information */
  28.     daddr_t    s_tfree;    /* total free blocks*/
  29.     ushort    s_tinode;    /* total free inodes */
  30.     char    s_fname[6];    /* file system name */
  31.     char    s_fpack[6];    /* file system pack name */
  32.     long    s_fill[12];    /* adjust to make sizeof filsys */
  33.     long    s_state;    /* file system state */
  34.     long    s_magic;    /* magic number to indicate new file system */
  35.     long    s_type;        /* type of new file system */
  36. } ;
  37.  
  38. #define FsMAGIC    0xfd187e20    /* s_magic */
  39.  
  40. #define Fs1b    1    /* 512 byte block */
  41. #define Fs2b    2    /* 1024 byte block */
  42. #define Fs4b    3    /* 2048 byte block */
  43.  
  44. #define    FsOKAY    0x7c269d38    /* s_state: clean */
  45. #define    FsACTIVE    0x5e72d81a    /* s_state: active */
  46. #define    FsBAD    0xcb096f43    /* s_state: bad root */
  47. #define FsBADBLK    0xbadbc14b    /* s_state: bad block corrupted it */
  48.  
  49. #define getfs(mp)    (struct filsys *)((struct buf *)mp->m_bufp)->b_un.b_addr
  50.