1: /*
2: * Copyright (c) 1980 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: * @(#)config.h 5.3 (Berkeley) 4/18/86
7: */
8:
9: /*
10: * Config.
11: */
12: #include <sys/types.h>
13:
14: #define NODEV ((dev_t)-1)
15:
16: struct file_list {
17: struct file_list *f_next;
18: char *f_fn; /* the name */
19: u_char f_type; /* see below */
20: u_char f_flags; /* see below */
21: short f_special; /* requires special make rule */
22: char *f_needs;
23: /*
24: * Random values:
25: * swap space parameters for swap areas
26: * root device, etc. for system specifications
27: */
28: union {
29: struct { /* when swap specification */
30: dev_t fuw_swapdev;
31: int fuw_swapsize;
32: } fuw;
33: struct { /* when system specification */
34: dev_t fus_rootdev;
35: dev_t fus_argdev;
36: dev_t fus_dumpdev;
37: } fus;
38: } fun;
39: #define f_swapdev fun.fuw.fuw_swapdev
40: #define f_swapsize fun.fuw.fuw_swapsize
41: #define f_rootdev fun.fus.fus_rootdev
42: #define f_argdev fun.fus.fus_argdev
43: #define f_dumpdev fun.fus.fus_dumpdev
44: };
45:
46: /*
47: * Types.
48: */
49: #define DRIVER 1
50: #define NORMAL 2
51: #define INVISIBLE 3
52: #define PROFILING 4
53: #define SYSTEMSPEC 5
54: #define SWAPSPEC 6
55:
56: /*
57: * Attributes (flags).
58: */
59: #define CONFIGDEP 1
60:
61: struct idlst {
62: char *id;
63: struct idlst *id_next;
64: };
65:
66: struct device {
67: int d_type; /* CONTROLLER, DEVICE, UBA or MBA */
68: struct device *d_conn; /* what it is connected to */
69: char *d_name; /* name of device (e.g. rk11) */
70: struct idlst *d_vec; /* interrupt vectors */
71: int d_pri; /* interrupt priority */
72: int d_addr; /* address of csr */
73: int d_unit; /* unit number */
74: int d_drive; /* drive number */
75: int d_slave; /* slave number */
76: #define QUES -1 /* -1 means '?' */
77: #define UNKNOWN -2 /* -2 means not set yet */
78: int d_dk; /* if init 1 set to number for iostat */
79: int d_flags; /* nlags for device init */
80: struct device *d_next; /* Next one in list */
81: };
82: #define TO_NEXUS (struct device *)-1
83:
84: struct config {
85: char *c_dev;
86: char *s_sysname;
87: };
88:
89: /*
90: * Config has a global notion of which machine type is
91: * being used. It uses the name of the machine in choosing
92: * files and directories. Thus if the name of the machine is ``vax'',
93: * it will build from ``Makefile.vax'' and use ``../vax/inline''
94: * in the makerules, etc.
95: */
96: int machine;
97: char *machinename;
98: #define MACHINE_VAX 1
99: #define MACHINE_SUN 2
100:
101: /*
102: * For each machine, a set of CPU's may be specified as supported.
103: * These and the options (below) are put in the C flags in the makefile.
104: */
105: struct cputype {
106: char *cpu_name;
107: struct cputype *cpu_next;
108: } *cputype;
109:
110: /*
111: * A set of options may also be specified which are like CPU types,
112: * but which may also specify values for the options.
113: * A separate set of options may be defined for make-style options.
114: */
115: struct opt {
116: char *op_name;
117: char *op_value;
118: struct opt *op_next;
119: } *opt, *mkopt;
120:
121: char *ident;
122: char *ns();
123: char *tc();
124: char *qu();
125: char *get_word();
126: char *path();
127: char *raise();
128:
129: int do_trace;
130:
131: char *index();
132: char *rindex();
133: char *malloc();
134: char *strcpy();
135: char *strcat();
136: char *sprintf();
137:
138: #if MACHINE_VAX
139: int seen_mba, seen_uba;
140: #endif
141:
142: struct device *connect();
143: struct device *dtab;
144: dev_t nametodev();
145: char *devtoname();
146:
147: char errbuf[80];
148: int yyline;
149:
150: struct file_list *ftab, *conf_list, **confp;
151: char *PREFIX;
152:
153: int timezone, hadtz;
154: int dst;
155: int profiling;
156:
157: int maxusers;
158:
159: #define eq(a,b) (!strcmp(a,b))
Defined variables
dst
defined in line
154; used 9 times
dtab
defined in line
143; used 17 times
- in /usr/src/etc/config/config.y line
513,
609,
637
- in /usr/src/etc/config/main.c line
44
- in /usr/src/etc/config/mkglue.c line
37,
57
- in /usr/src/etc/config/mkheaders.c line
40
- in /usr/src/etc/config/mkioconf.c line
47,
57,
94,
115,
150,
187,
289,
304,
341
- in /usr/src/etc/config/mkmakefile.c line
288
ftab
defined in line
150; used 8 times
opt
defined in line
119; used 6 times
Defined struct's
device
defined in line
66; used 54 times
- in line 68(2),
80(2),
142-143(4)
- in /usr/src/etc/config/config.y line
79-80(4),
506-510(6),
599-605(6),
626-631(6),
683(2),
698(2)
- in /usr/src/etc/config/mkglue.c line
25(2),
39(2),
59(2)
- in /usr/src/etc/config/mkheaders.c line
37(2),
57-58(4)
- in /usr/src/etc/config/mkioconf.c line
24(2),
268(2),
412(2)
- in /usr/src/etc/config/mkmakefile.c line
207(2)
file_list
defined in line
16; used 90 times
- in line 17(2),
150(2)
- in /usr/src/etc/config/config.y line
4(2),
207(2),
219(2),
230(2),
248(2),
267(2),
525-527(4),
541-544(6),
559-562(4),
735-738(4),
799(2),
816(2),
847(2)
- in /usr/src/etc/config/mkheaders.c line
22(2),
72(2),
109(2),
122(2)
- in /usr/src/etc/config/mkmakefile.c line
30(2),
36-40(4),
52-56(4),
68-73(6),
206(2),
376(2),
414(2),
458(2),
546-548(4),
567-570(4)
- in /usr/src/etc/config/mkswapconf.c line
21-22(4),
34-40(6)
idlst
defined in line
61; used 24 times
opt
defined in line
115; used 24 times
Defined macros
NODEV
defined in line
14; used 14 times
QUES
defined in line
76; used 10 times
TO_NEXUS
defined in line
82; used 14 times
- in /usr/src/etc/config/config.y line
435,
450,
674
- in /usr/src/etc/config/mkioconf.c line
49,
60,
99-102(2),
119,
152,
190-194(2),
292,
306,
344
eq
defined in line
159; used 55 times
- in /usr/src/etc/config/config.y line
209,
409-411(2),
429(2),
589,
610,
638,
651,
705(2),
712,
746,
853
- in /usr/src/etc/config/main.c line
31
- in /usr/src/etc/config/mkglue.c line
40,
60
- in /usr/src/etc/config/mkheaders.c line
41,
102
- in /usr/src/etc/config/mkioconf.c line
50,
60,
103,
120,
153,
191-197(3),
254-255(2),
293,
307,
345-347(2),
402-403(2)
- in /usr/src/etc/config/mkmakefile.c line
43,
59,
182-188(4),
264-266(2),
274-279(3),
289,
321,
336-343(3),
391,
610
- in /usr/src/etc/config/mkswapconf.c line
43,
140
Usage of this include