install correct aliases file
[unix-history] / usr / src / usr.sbin / config / config.h
... / ...
CommitLineData
1/*
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16 *
17 * @(#)config.h 5.8 (Berkeley) %G%
18 */
19
20/*
21 * Config.
22 */
23#include <sys/types.h>
24
25#define NODEV ((dev_t)-1)
26
27struct file_list {
28 struct file_list *f_next;
29 char *f_fn; /* the name */
30 u_char f_type; /* see below */
31 u_char f_flags; /* see below */
32 short f_special; /* requires special make rule */
33 char *f_needs;
34 /*
35 * Random values:
36 * swap space parameters for swap areas
37 * root device, etc. for system specifications
38 */
39 union {
40 struct { /* when swap specification */
41 dev_t fuw_swapdev;
42 int fuw_swapsize;
43 } fuw;
44 struct { /* when system specification */
45 dev_t fus_rootdev;
46 dev_t fus_argdev;
47 dev_t fus_dumpdev;
48 } fus;
49 } fun;
50#define f_swapdev fun.fuw.fuw_swapdev
51#define f_swapsize fun.fuw.fuw_swapsize
52#define f_rootdev fun.fus.fus_rootdev
53#define f_argdev fun.fus.fus_argdev
54#define f_dumpdev fun.fus.fus_dumpdev
55};
56
57/*
58 * Types.
59 */
60#define DRIVER 1
61#define NORMAL 2
62#define INVISIBLE 3
63#define PROFILING 4
64#define SYSTEMSPEC 5
65#define SWAPSPEC 6
66
67/*
68 * Attributes (flags).
69 */
70#define CONFIGDEP 1
71
72struct idlst {
73 char *id;
74 struct idlst *id_next;
75};
76
77struct device {
78 int d_type; /* CONTROLLER, DEVICE, bus adaptor */
79 struct device *d_conn; /* what it is connected to */
80 char *d_name; /* name of device (e.g. rk11) */
81 struct idlst *d_vec; /* interrupt vectors */
82 int d_pri; /* interrupt priority */
83 int d_addr; /* address of csr */
84 int d_unit; /* unit number */
85 int d_drive; /* drive number */
86 int d_slave; /* slave number */
87#define QUES -1 /* -1 means '?' */
88#define UNKNOWN -2 /* -2 means not set yet */
89 int d_dk; /* if init 1 set to number for iostat */
90 int d_flags; /* nlags for device init */
91 struct device *d_next; /* Next one in list */
92};
93#define TO_NEXUS (struct device *)-1
94#define TO_VBA (struct device *)-2
95
96struct config {
97 char *c_dev;
98 char *s_sysname;
99};
100
101/*
102 * Config has a global notion of which machine type is
103 * being used. It uses the name of the machine in choosing
104 * files and directories. Thus if the name of the machine is ``vax'',
105 * it will build from ``Makefile.vax'' and use ``../vax/inline''
106 * in the makerules, etc.
107 */
108int machine;
109char *machinename;
110#define MACHINE_VAX 1
111#define MACHINE_TAHOE 2
112
113/*
114 * For each machine, a set of CPU's may be specified as supported.
115 * These and the options (below) are put in the C flags in the makefile.
116 */
117struct cputype {
118 char *cpu_name;
119 struct cputype *cpu_next;
120} *cputype;
121
122/*
123 * A set of options may also be specified which are like CPU types,
124 * but which may also specify values for the options.
125 * A separate set of options may be defined for make-style options.
126 */
127struct opt {
128 char *op_name;
129 char *op_value;
130 struct opt *op_next;
131} *opt, *mkopt;
132
133char *ident;
134char *ns();
135char *tc();
136char *qu();
137char *get_word();
138char *path();
139char *raise();
140
141int do_trace;
142
143char *index();
144char *rindex();
145char *malloc();
146char *strcpy();
147char *strcat();
148
149#if MACHINE_VAX
150int seen_mba, seen_uba;
151#endif
152#if MACHINE_TAHOE
153int seen_vba;
154#endif
155
156struct device *connect();
157struct device *dtab;
158dev_t nametodev();
159char *devtoname();
160
161char errbuf[80];
162int yyline;
163
164struct file_list *ftab, *conf_list, **confp;
165
166int timezone, hadtz;
167int dst;
168int profiling;
169
170int maxusers;
171
172#define eq(a,b) (!strcmp(a,b))