|
|
1.1 root 1: /* config.h 1.13 83/06/16 */
2:
3: /*
4: * Config.
5: */
6: #include <sys/types.h>
7:
8: #define NODEV ((dev_t)-1)
9:
10: struct file_list {
11: struct file_list *f_next;
12: char *f_fn; /* the name */
13: u_char f_type; /* see below */
14: u_char f_flags; /* see below */
15: short f_special; /* requires special make rule */
16: char *f_needs;
17: /*
18: * Random values:
19: * swap space parameters for swap areas
20: * root device, etc. for system specifications
21: */
22: union {
23: struct { /* when swap specification */
24: dev_t fuw_swapdev;
25: int fuw_swapsize;
26: } fuw;
27: struct { /* when system specification */
28: dev_t fus_rootdev;
29: dev_t fus_argdev;
30: dev_t fus_dumpdev;
31: } fus;
32: } fun;
33: #define f_swapdev fun.fuw.fuw_swapdev
34: #define f_swapsize fun.fuw.fuw_swapsize
35: #define f_rootdev fun.fus.fus_rootdev
36: #define f_argdev fun.fus.fus_argdev
37: #define f_dumpdev fun.fus.fus_dumpdev
38: };
39:
40: /*
41: * Types.
42: */
43: #define DRIVER 1
44: #define NORMAL 2
45: #define INVISIBLE 3
46: #define PROFILING 4
47: #define SYSTEMSPEC 5
48: #define SWAPSPEC 6
49:
50: /*
51: * Attributes (flags).
52: */
53: #define CONFIGDEP 1
54:
55: struct idlst {
56: char *id;
57: struct idlst *id_next;
58: };
59:
60: struct device {
61: int d_type; /* CONTROLLER, DEVICE, or VBA */
62: struct device *d_conn; /* what it is connected to */
63: char *d_name; /* name of device (e.g. rk11) */
64: struct idlst *d_vec; /* interrupt vectors */
65: int d_pri; /* interrupt priority */
66: int d_addr; /* address of csr */
67: int d_unit; /* unit number */
68: int d_drive; /* drive number */
69: int d_slave; /* slave number */
70: #define QUES -1 /* -1 means '?' */
71: #define UNKNOWN -2 /* -2 means not set yet */
72: int d_dk; /* if init 1 set to number for iostat */
73: int d_flags; /* nlags for device init */
74: struct device *d_next; /* Next one in list */
75: };
76: #define TO_NEXUS (struct device *)-1
77: #define TO_VBA (struct device *)-2
78:
79: struct config {
80: char *c_dev;
81: char *s_sysname;
82: };
83:
84: /*
85: * Config has a global notion of which machine type is
86: * being used. It uses the name of the machine in choosing
87: * files and directories. Thus if the name of the machine is ``vax'',
88: * it will build from ``makefile.vax'' and use ``../vax/asm.sed''
89: * in the makerules, etc.
90: */
91: int machine;
92: char *machinename;
93: #define MACHINE_VAX 1
94: #define MACHINE_SUN 2
95: #define MACHINE_TAHOE 3
96:
97: /*
98: * For each machine, a set of CPU's may be specified as supported.
99: * These and the options (below) are put in the C flags in the makefile.
100: */
101: struct cputype {
102: char *cpu_name;
103: struct cputype *cpu_next;
104: } *cputype;
105:
106: /*
107: * A set of options may also be specified which are like CPU types,
108: * but which may also specify values for the options.
109: */
110: struct opt {
111: char *op_name;
112: char *op_value;
113: struct opt *op_next;
114: } *opt;
115:
116: char *ident;
117: char *ns();
118: char *tc();
119: char *qu();
120: char *get_word();
121: char *path();
122: char *raise();
123:
124: int do_trace;
125:
126: char *index();
127: char *rindex();
128: char *malloc();
129: char *strcpy();
130: char *strcat();
131: char *sprintf();
132:
133: int seen_vba, seen_mba, seen_uba;
134:
135: struct device *connect();
136: struct device *dtab;
137: dev_t nametodev();
138: char *devtoname();
139:
140: char errbuf[80];
141: int yyline;
142:
143: struct file_list *ftab, *conf_list, **confp;
144: char *PREFIX;
145:
146: int hz, timezone, hadtz;
147: int dst;
148: int profiling;
149:
150: int maxusers;
151:
152: #define eq(a,b) (!strcmp(a,b))
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.