xref: /original-bsd/usr.sbin/config/config.h (revision f0fd5f8a)
1 /*	config.h	1.10	82/10/25	*/
2 
3 /*
4  * Config.
5  */
6 struct file_list {
7 	char	*f_fn;			/* the name */
8 	int	f_type;			/* see below */
9 	struct	file_list *f_next;
10 	char	*f_needs;
11 };
12 #define DRIVER		1
13 #define NORMAL		2
14 #define	INVISIBLE	3
15 #define	PROFILING	4
16 
17 struct	idlst {
18 	char	*id;
19 	struct	idlst *id_next;
20 };
21 
22 struct device {
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) */
26 	struct	idlst *d_vec;		/* interrupt vectors */
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 */
32 #define QUES	-1	/* -1 means '?' */
33 #define	UNKNOWN -2	/* -2 means not set yet */
34 	int	d_dk;			/* if init 1 set to number for iostat */
35 	int	d_flags;		/* nlags for device init */
36 	struct	device *d_next;		/* Next one in list */
37 };
38 #define TO_NEXUS	(struct device *)-1
39 
40 struct config {
41 	char	*c_dev;
42 	char	*s_sysname;
43 };
44 
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  */
61 struct cputype {
62 	char	*cpu_name;
63 	struct	cputype *cpu_next;
64 } *cputype;
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  */
70 struct opt {
71 	char	*op_name;
72 	char	*op_value;
73 	struct	opt *op_next;
74 } *opt;
75 
76 char	*ident;
77 char	*ns();
78 char	*tc();
79 char	*qu();
80 char	*get_word();
81 char	*path();
82 char	*raise();
83 
84 int	do_trace;
85 
86 char	*index();
87 char	*rindex();
88 char	*malloc();
89 char	*strcpy();
90 char	*strcat();
91 char	*sprintf();
92 
93 #if MACHINE_VAX
94 int	seen_mba, seen_uba;
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 
106 int	timezone, hadtz;
107 int	dst;
108 int	profiling;
109 
110 int	maxusers;
111 
112 #define eq(a,b)	(!strcmp(a,b))
113