|
|
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: * Disk inode.
8: */
9:
10: #ifndef INO_H
11: #define INO_H INO_H
12:
13: #include <sys/types.h>
14:
15: /*
16: * Structure of inode as it appears on disk.
17: */
18: struct dinode {
19: unsigned short di_mode; /* Mode */
20: short di_nlink; /* Link count */
21: short di_uid; /* User id of owner */
22: short di_gid; /* Group id of owner */
23: fsize_t di_size; /* Size of file in bytes */
24:
25: union dia_u {
26: char di_addb[40]; /* Disk block addresses */
27: dev_t di_rdev; /* Device */
28:
29: struct dip_s { /* Pipes */
30: char dp_addp[30];
31: short dp_pnc;
32: short dp_prx;
33: short dp_pwx;
34: } di_p;
35: } di_a;
36:
37: time_t di_atime; /* Last access time */
38: time_t di_mtime; /* Last modify time */
39: time_t di_ctime; /* Last creation time */
40: };
41:
42: /*
43: * Compatibility.
44: */
45: #define di_addr di_a.di_addb
46: #define di_addp di_a.di_p.dp_addp
47: #define di_pnc di_a.di_p.dp_pnc
48: #define di_prx di_a.di_p.dp_prx
49: #define di_pwx di_a.di_p.dp_pwx
50:
51: /*
52: * Miscellaneous manifests.
53: */
54: #define NBN 128 /* Number of indirects per block */
55: #define L2NBN 7 /* Log2(NBN) */
56: #define ND 10 /* Number of direct blocks */
57: #define NI 3 /* Number of indirect blocks */
58: #define NADDR 13 /* Total number of addresses */
59:
60: /*
61: * Modes.
62: */
63: #define IFMT 0170000 /* Type */
64: #define IFDIR 0040000 /* Directory */
65: #define IFCHR 0020000 /* Character special file */
66: #define IFBLK 0060000 /* Block special file */
67: #define IFREG 0100000 /* Regular file */
68: #define IFMPC 0030000 /* Multiplexed character special */
69: #define IFMPB 0070000 /* Multiplexed block special */
70: #define IFPIPE 0010000 /* Pipe */
71: #define ISUID 0004000 /* Set user id on execution */
72: #define ISGID 0002000 /* Set group id on execution */
73: #define ISVTXT 0001000 /* Save swapped text even after use */
74:
75: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.