Commit | Line | Data |
---|---|---|
22d68ad0 | 1 | /* config.h 1.10 82/10/25 */ |
358ba8d4 | 2 | |
12c6954d | 3 | /* |
22d68ad0 | 4 | * Config. |
12c6954d | 5 | */ |
358ba8d4 | 6 | struct file_list { |
12c6954d BJ |
7 | char *f_fn; /* the name */ |
8 | int f_type; /* see below */ | |
9 | struct file_list *f_next; | |
10 | char *f_needs; | |
358ba8d4 | 11 | }; |
12c6954d BJ |
12 | #define DRIVER 1 |
13 | #define NORMAL 2 | |
14 | #define INVISIBLE 3 | |
15 | #define PROFILING 4 | |
358ba8d4 | 16 | |
08f9a943 | 17 | struct idlst { |
12c6954d BJ |
18 | char *id; |
19 | struct idlst *id_next; | |
08f9a943 BJ |
20 | }; |
21 | ||
358ba8d4 | 22 | struct device { |
12c6954d BJ |
23 | int d_type; /* CONTROLLER, DEVICE, UBA or MBA */ |
24 | struct device *d_conn; /* what it is connected to */ | |
25 | char *d_name; /* name of device (e.g. rk11) */ | |
22d68ad0 | 26 | struct idlst *d_vec; /* interrupt vectors */ |
12c6954d BJ |
27 | int d_pri; /* interrupt priority */ |
28 | int d_addr; /* address of csr */ | |
29 | int d_unit; /* unit number */ | |
30 | int d_drive; /* drive number */ | |
31 | int d_slave; /* slave number */ | |
a5e18d6b MT |
32 | #define QUES -1 /* -1 means '?' */ |
33 | #define UNKNOWN -2 /* -2 means not set yet */ | |
821eeaae | 34 | int d_dk; /* if init 1 set to number for iostat */ |
12c6954d BJ |
35 | int d_flags; /* nlags for device init */ |
36 | struct device *d_next; /* Next one in list */ | |
358ba8d4 | 37 | }; |
22d68ad0 | 38 | #define TO_NEXUS (struct device *)-1 |
358ba8d4 MT |
39 | |
40 | struct config { | |
12c6954d BJ |
41 | char *c_dev; |
42 | char *s_sysname; | |
358ba8d4 MT |
43 | }; |
44 | ||
12c6954d BJ |
45 | /* |
46 | * Config has a global notion of which machine type is | |
47 | * being used. It uses the name of the machine in choosing | |
48 | * files and directories. Thus if the name of the machine is ``vax'', | |
49 | * it will build from ``makefile.vax'' and use ``../vax/asm.sed'' | |
50 | * in the makerules, etc. | |
51 | */ | |
52 | int machine; | |
53 | char *machinename; | |
54 | #define MACHINE_VAX 1 | |
55 | #define MACHINE_SUN 2 | |
56 | ||
57 | /* | |
58 | * For each machine, a set of CPU's may be specified as supported. | |
59 | * These and the options (below) are put in the C flags in the makefile. | |
60 | */ | |
a5e18d6b | 61 | struct cputype { |
12c6954d BJ |
62 | char *cpu_name; |
63 | struct cputype *cpu_next; | |
a5e18d6b | 64 | } *cputype; |
12c6954d BJ |
65 | |
66 | /* | |
67 | * A set of options may also be specified which are like CPU types, | |
68 | * but which may also specify values for the options. | |
69 | */ | |
e809ccba | 70 | struct opt { |
12c6954d BJ |
71 | char *op_name; |
72 | char *op_value; | |
22d68ad0 | 73 | struct opt *op_next; |
e809ccba | 74 | } *opt; |
12c6954d | 75 | |
22d68ad0 BJ |
76 | char *ident; |
77 | char *ns(); | |
78 | char *tc(); | |
79 | char *qu(); | |
80 | char *get_word(); | |
81 | char *path(); | |
82 | char *raise(); | |
83 | ||
821eeaae | 84 | int do_trace; |
12c6954d | 85 | |
22d68ad0 BJ |
86 | char *index(); |
87 | char *rindex(); | |
88 | char *malloc(); | |
89 | char *strcpy(); | |
90 | char *strcat(); | |
91 | char *sprintf(); | |
92 | ||
12c6954d | 93 | #if MACHINE_VAX |
821eeaae | 94 | int seen_mba, seen_uba; |
12c6954d BJ |
95 | #endif |
96 | ||
97 | struct device *connect(); | |
98 | struct device *dtab; | |
99 | ||
100 | char errbuf[80]; | |
101 | int yyline; | |
102 | ||
103 | struct file_list *ftab, *conf_list, *confp; | |
104 | char *PREFIX; | |
105 | ||
22d68ad0 | 106 | int timezone, hadtz; |
12c6954d | 107 | int dst; |
8486638c | 108 | int profiling; |
12c6954d BJ |
109 | |
110 | int maxusers; | |
111 | ||
112 | #define eq(a,b) (!strcmp(a,b)) |