|
|
1.1 ! root 1: /* (-lgl ! 2: * COHERENT Version 4.0 ! 3: * Copyright (c) 1982, 1992 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: /*#pragma align 2*/ ! 34: daddr_t s_fsize; /* Size of entire volume */ ! 35: /*#pragma align*/ ! 36: short s_nfree; /* Number of addresses in s_free */ ! 37: daddr_t s_free[NICFREE]; /* Free block list */ ! 38: short s_ninode; /* Number of inodes in s_inode */ ! 39: ino_t s_inode[NICINOD]; /* Free inode list */ ! 40: char s_flock; /* Not used */ ! 41: char s_ilock; /* Not used */ ! 42: char s_fmod; /* Super block modified flag */ ! 43: char s_ronly; /* Mounted read only flag */ ! 44: /*#pragma align 2*/ ! 45: time_t s_time; /* Last super block update */ ! 46: daddr_t s_tfree; /* Total free blocks */ ! 47: /*#pragma align*/ ! 48: ino_t s_tinode; /* Total free inodes */ ! 49: short s_m; /* Interleave factor */ ! 50: short s_n; /* Interleave factor */ ! 51: char s_fname[6]; /* File system name */ ! 52: char s_fpack[6]; /* File system pack name */ ! 53: long s_unique; /* Unique number */ ! 54: }; ! 55: ! 56: /* ! 57: * Functions. ! 58: */ ! 59: #define iblockn(ino) (INODEI+(ino-1)/INOPB) ! 60: #define iblocko(ino) ((ino-1)%INOPB) ! 61: ! 62: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.