home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / fs / s5filsys.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.3 KB  |  64 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 _FS_S5FILSYS_H
  11. #define _FS_S5FILSYS_H
  12.  
  13. #ident    "@(#)/usr/include/sys/fs/s5filsys.h.sl 1.1 4.0 12/08/90 1498 AT&T-USL"
  14. /*
  15.  * Structure of the super-block.
  16.  */
  17.  
  18. struct    filsys
  19. {
  20.     u_short    s_isize;    /* size in blocks of i-list */
  21.     daddr_t    s_fsize;    /* size in blocks of entire volume */
  22.     short    s_nfree;    /* number of addresses in s_free */
  23.     daddr_t    s_free[NICFREE];/* free block list */
  24.         /* S5 inode definition cannot change for EFT */
  25.     short    s_ninode;    /* number of i-nodes in s_inode */
  26.     o_ino_t    s_inode[NICINOD];/* free i-node list */
  27.     char    s_flock;    /* lock during free list manipulation */
  28.     char    s_ilock;    /* lock during i-list manipulation */
  29.     char      s_fmod;     /* super block modified flag */
  30.     char    s_ronly;    /* mounted read-only flag */
  31.     time_t    s_time;     /* last super block update */
  32.     short    s_dinfo[4];    /* device information */
  33.     daddr_t    s_tfree;    /* total free blocks*/
  34.     o_ino_t    s_tinode;    /* total free inodes */
  35.     char    s_fname[6];    /* file system name */
  36.     char    s_fpack[6];    /* file system pack name */
  37.     long    s_fill[12];    /* adjust to make sizeof filsys */
  38.     long    s_state;    /* file system state */
  39.     long    s_magic;    /* magic number to indicate new file system */
  40.     u_long    s_type;        /* type of new file system */
  41. } ;
  42. #define s_bshift  s_type    /* so far, type is just bsize shift factor */
  43.  
  44. #define FsMAGIC    0xfd187e20    /* s_magic */
  45.  
  46. #define FsMINBSHIFT    1
  47. #define FsMINBSIZE    512
  48.  
  49. #define FsBSIZE(bshift)        (FsMINBSIZE << ((bshift) - FsMINBSHIFT))
  50.  
  51. /* Old symbols for specific s_type values. */
  52. #define Fs1b    1    /* 512-byte blocks */
  53. #define Fs2b    2    /* 1024-byte blocks */
  54. #define Fs4b    3    /* 2048-byte blocks */
  55.  
  56. #define    FsOKAY    0x7c269d38    /* s_state: clean */
  57. #define    FsACTIVE    0x5e72d81a    /* s_state: active */
  58. #define    FsBAD    0xcb096f43    /* s_state: bad root */
  59. #define FsBADBLK    0xbadbc14b    /* s_state: bad block corrupted it */
  60.  
  61. #define getfs(vfsp)    ((struct filsys *)((struct s5vfs *)vfsp->vfs_data)->vfs_bufp->b_un.b_addr)
  62.  
  63. #endif    /* _FS_S5FILSYS_H */
  64.