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