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