home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / filsys.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  2.3 KB  |  76 lines

  1. /*
  2.  *    @(#) filsys.h 2.1 88/05/18 
  3.  *
  4.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987.
  5.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987.
  6.  *    This Module contains Proprietary Information of
  7.  *    The Santa Cruz Operation, Microsoft Corporation
  8.  *    and AT&T, and should be treated as Confidential.
  9.  */
  10.  
  11. /*
  12.  * THIS FILE CONTAINS CODE WHICH IS DESIGNED TO BE
  13.  * PORTABLE BETWEEN DIFFERENT MACHINE ARCHITECTURES
  14.  * AND CONFIGURATIONS. IT SHOULD NOT REQUIRE ANY
  15.  * MODIFICATIONS WHEN ADAPTING XENIX TO NEW HARDWARE.
  16.  */
  17.  
  18.  
  19.  
  20. /*
  21.  * Structure of the super-block
  22.  */
  23. #ifdef M_I386
  24. #pragma    pack(2)
  25. #endif
  26. struct    filsys
  27. {
  28.     ushort    s_isize;    /* size in blocks of i-list */
  29.     daddr_t    s_fsize;    /* size in blocks of entire volume */
  30.     short    s_nfree;    /* number of addresses in s_free */
  31.     daddr_t    s_free[NICFREE];    /* free block list */
  32.     short    s_ninode;    /* number of i-nodes in s_inode */
  33.     ino_t    s_inode[NICINOD];    /* free i-node list */
  34.     char    s_flock;    /* lock during free list manipulation */
  35.     char    s_ilock;    /* lock during i-list manipulation */
  36.     char      s_fmod;     /* super block modified flag */
  37.     char    s_ronly;    /* mounted read-only flag */
  38.     time_t    s_time;     /* last super block update */
  39.     daddr_t    s_tfree;    /* total free blocks*/
  40.     ino_t    s_tinode;    /* total free inodes */
  41.     short   s_dinfo[4];     /* device information */
  42.     char    s_fname[6];    /* file system name */
  43.     char    s_fpack[6];    /* file system pack name */
  44.     /* remainder is maintained for xenix */
  45.     char       s_clean;       /* S_CLEAN if structure is properly closed */
  46.     char    s_fill[NSBFILL];/* space to make sizeof filsys be BSIZE */
  47.     long    s_magic;        /* indicates version of filsys */
  48.     long    s_type;        /* type of new file system */
  49. };
  50. #ifdef M_I386
  51. #pragma    pack()
  52. #endif
  53.  
  54. #define    S_CLEAN    0106            /* arbitrary magic value  */
  55.  
  56. /* s_magic, magic value for file system version */
  57. #define    S_S3MAGIC    0x2b5544    /* system 3 arbitrary magic value */
  58.  
  59. /* s_type, block size of file system */
  60. #define    S_B512        1    /* 512 byte block */
  61. #define    S_B1024        2    /* 1024 byte block */
  62.  
  63. /* codes for file system version (for utilities) */
  64. #define    S_V2        1        /* version 7 */
  65. #define    S_V3        2        /* system 3 */
  66.  
  67. #ifdef M_KERNEL
  68. /* a pointer to a struct filsys */
  69. #ifdef M_I386
  70. typedef struct filsys *filsysp_t;
  71. #else
  72. typedef struct filsys far *filsysp_t;
  73. #endif
  74. extern filsysp_t getfs();
  75. #endif
  76.