|
|
1.1 ! root 1: /* (-lgl ! 2: * COHERENT Version 3.0 ! 3: * Copyright (c) 1982, 1990 by Mark Williams Company. ! 4: * All rights reserved. May not be copied without permission. ! 5: -lgl) */ ! 6: /* ! 7: * Super block. ! 8: */ ! 9: ! 10: #ifndef FILSYS_H ! 11: #define FILSYS_H FILSYS_H ! 12: ! 13: #include <sys/types.h> ! 14: #include <sys/fblk.h> ! 15: ! 16: /* ! 17: * Size definitions. ! 18: */ ! 19: #define NICINOD 100 /* Number of free in core inodes */ ! 20: #define BSIZE 512 /* Block size */ ! 21: #define INOPB 8 /* Number of inodes per block */ ! 22: #define BOOTBI 0 /* Boot block index */ ! 23: #define SUPERI 1 /* Super block index */ ! 24: #define INODEI 2 /* Inode block index */ ! 25: #define BADFIN 1 /* Bad block inode number */ ! 26: #define ROOTIN 2 /* Root inode number */ ! 27: ! 28: /* ! 29: * Super block. ! 30: */ ! 31: struct filsys { ! 32: unsigned short s_isize; /* Firt block not in inode list */ ! 33: daddr_t s_fsize; /* Size of entire volume */ ! 34: short s_nfree; /* Number of addresses in s_free */ ! 35: daddr_t s_free[NICFREE]; /* Free block list */ ! 36: short s_ninode; /* Number of inodes in s_inode */ ! 37: ino_t s_inode[NICINOD]; /* Free inode list */ ! 38: char s_flock; /* Not used */ ! 39: char s_ilock; /* Not used */ ! 40: char s_fmod; /* Super block modified flag */ ! 41: char s_ronly; /* Mounted read only flag */ ! 42: time_t s_time; /* Last super block update */ ! 43: daddr_t s_tfree; /* Total free blocks */ ! 44: ino_t s_tinode; /* Total free inodes */ ! 45: short s_m; /* Interleave factor */ ! 46: short s_n; /* Interleave factor */ ! 47: char s_fname[6]; /* File system name */ ! 48: char s_fpack[6]; /* File system pack name */ ! 49: long s_unique; /* Unique number */ ! 50: }; ! 51: ! 52: /* ! 53: * Functions. ! 54: */ ! 55: #define iblockn(ino) (INODEI+(ino-1)/INOPB) ! 56: #define iblocko(ino) ((ino-1)%INOPB) ! 57: ! 58: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.