|
|
1.1 ! root 1: /* ! 2: * config.h 1.5 81/05/22 ! 3: * Definitions that everybody needs to know ! 4: */ ! 5: ! 6: #define eq(a,b) (strcmp(a,b) == 0) ! 7: #define TRUE 1 ! 8: #define FALSE 0 ! 9: #define DRIVER 1 ! 10: #define NORMAL 2 ! 11: #define INVISIBLE 3 ! 12: ! 13: #define TO_NEXUS (struct device *)-1 ! 14: ! 15: #define STREAM_DEVICE 1 ! 16: #define BLOCK_DEVICE 2 ! 17: #define CHAR_DEVICE 3 ! 18: #define LINE_DISC 4 ! 19: #define FILE_SYS 5 ! 20: #define NDEVTYPE 5 ! 21: ! 22: struct file_list { ! 23: char *f_fn; ! 24: int f_type; ! 25: struct file_list *f_next; ! 26: char *f_needs; ! 27: }; ! 28: ! 29: struct dev_list { ! 30: char *dev_name; ! 31: int dev_standard; ! 32: int dev_type; ! 33: int dev_num; ! 34: long dev_mask; ! 35: char *dev_if; ! 36: char *dev_prefix; ! 37: struct dev_list *dev_next; ! 38: }; ! 39: ! 40: struct idlst { ! 41: char *id; ! 42: struct idlst *id_next; ! 43: }; ! 44: ! 45: struct litlst { ! 46: char *line; ! 47: struct litlst *lit_next; ! 48: }; ! 49: ! 50: typedef char bool; ! 51: ! 52: struct device { ! 53: int d_type; /* CONTROLLER, DEVICE, UBA or MBA */ ! 54: struct device *d_conn; /* What it is connected to */ ! 55: char *d_name; /* Name of device (e.g. rk11) */ ! 56: struct idlst *d_vec; /* Interrupt vectors */ ! 57: int d_addr; /* Address of csr */ ! 58: int d_unit; /* Unit number */ ! 59: int d_drive; /* Drive number */ ! 60: int d_slave; /* Slave number */ ! 61: #define QUES -1 /* -1 means '?' */ ! 62: #define UNKNOWN -2 /* -2 means not set yet */ ! 63: bool d_dk; /* if init 1 set to number for iostat */ ! 64: int d_flags; /* Flags for device init */ ! 65: int d_count; /* # for pseudo devs */ ! 66: struct device *d_next; /* Next one in list */ ! 67: }; ! 68: ! 69: struct config { ! 70: char *c_dev; ! 71: char *s_sysname; ! 72: }; ! 73: ! 74: struct cputype { ! 75: char *cpu_name; ! 76: struct cputype *cpu_next; ! 77: } *cputype; ! 78: struct opt { ! 79: char *op_name; ! 80: struct opt *op_next; ! 81: } *opt; ! 82: char *ident, *mkfile, *ns(), *malloc(), *tc(), *qu(); ! 83: bool do_trace, seen_mba, seen_uba; ! 84: struct device *connect(); ! 85: struct device *dtab; ! 86: char errbuf[80]; ! 87: int yyline; ! 88: struct file_list *ftab, *conf_list, *confp; ! 89: int hz, timezone, hadtz, maxusers, dst; ! 90: struct dev_list *devtab; ! 91: struct litlst *littab; ! 92: int max_num[NDEVTYPE+1]; ! 93: ! 94: #define WEOF (char *)EOF ! 95: char *get_word(); ! 96: ! 97: #define GLOBAL(file) gpath(file) /* file for all systems */ ! 98: #define LOCAL(file) file /* file for just our system */ ! 99: char *gpath();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.