1: /*
2: * Copyright (c) 1986 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)saio.h 2.2 (2.11BSD GTE) 1996/3/8
7: */
8:
9: /*
10: * This must be done so that the standalone I/O system uses the same
11: * size for the inode structure as the utilities (restor, mkfs, etc).
12: * See the comments in mkfs.c for more information.
13: */
14: #undef EXTERNALITIMES
15:
16: #include <sys/fs.h>
17: #include <sys/inode.h>
18: #include <sys/disklabel.h>
19:
20: /*
21: * io block: includes an
22: * inode, cells for the use of seek, etc, a buffer
23: * and a disklabel.
24: */
25: struct iob {
26: char i_flgs;
27: char i_ctlr;
28: struct inode i_ino;
29: short i_unit;
30: short i_part;
31: daddr_t i_boff;
32: off_t i_offset;
33: daddr_t i_bn;
34: char *i_ma;
35: int i_cc;
36: char i_buf[DEV_BSIZE];
37: struct disklabel i_label;
38: };
39:
40: #define F_READ 01
41: #define F_WRITE 02
42: #define F_ALLOC 04
43: #define F_FILE 010
44: #define F_TAPE 020
45: #define READ F_READ
46: #define WRITE F_WRITE
47:
48: #define READLABEL 0x1
49: #define WRITELABEL 0x2
50: #define DEFAULTLABEL 0x3
51:
52: /*
53: * device switch
54: */
55: struct devsw {
56: char *dv_name;
57: int (*dv_strategy)();
58: int (*dv_open)();
59: int (*dv_close)();
60: caddr_t **dv_csr;
61: int (*dv_label)();
62: int (*dv_seek)();
63: };
64:
65: /*
66: * Set to inhibit 'disklabel missing or corrupt' error messages. This
67: * is normally left off and only set by the standalone disklabeling utility
68: * when it expects to be reading an unlabeled disk.
69: */
70: int Nolabelerr;
71:
72: extern char *itoa();
73: extern char *devname();
Defined variables
Defined struct's
devsw
defined in line
55; used 12 times
iob
defined in line
25; used 142 times
- in /usr/src/sys/pdpstand/boot.c line
43(2),
131(2)
- in /usr/src/sys/pdpstand/br.c line
33(2),
96(2)
- in /usr/src/sys/pdpstand/conf.c line
86(2),
93(2),
99(2),
105(2),
116(2),
123(2),
186(2),
218(2)
- in /usr/src/sys/pdpstand/disklabel.c line
16(2),
23(2),
85(2)
- in /usr/src/sys/pdpstand/hk.c line
34(2),
100(2),
136(2)
- in /usr/src/sys/pdpstand/ht.c line
31(2),
52(2),
63(2),
87(2)
- in /usr/src/sys/pdpstand/label.c line
29(2),
76(2)
- in /usr/src/sys/pdpstand/ra.c line
65(2),
111(2),
118(2),
134(2),
190(2),
242(2)
- in /usr/src/sys/pdpstand/rk.c line
27(2),
60(2)
- in /usr/src/sys/pdpstand/rl.c line
53(2),
135(2),
170(2),
212(2)
- in /usr/src/sys/pdpstand/rx.c line
43(2),
104(2)
- in /usr/src/sys/pdpstand/si.c line
32(2),
88(2)
- in /usr/src/sys/pdpstand/sys.c line
54(2),
61(2),
71(2),
94(2),
134(2),
223(2),
256(2),
292(2),
328(2),
396(2),
436(2),
462(2),
588(2),
650(2)
- in /usr/src/sys/pdpstand/tm.c line
36(2),
42(2),
62(2),
118(2)
- in /usr/src/sys/pdpstand/tmscp.c line
83(2),
173(2),
189(2),
269(2),
297(2)
- in /usr/src/sys/pdpstand/ts.c line
39(2),
92(2),
98(2),
151(2)
- in /usr/src/sys/pdpstand/xp.c line
29(2),
63(2),
71(2),
172(2)
Defined macros
READ
defined in line
45; used 14 times
WRITE
defined in line
46; used 8 times
Usage of this include