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