1 /* conf.h 4.7 81/04/03 */ 2 3 /* 4 * Declaration of block device 5 * switch. Each entry (row) is 6 * the only link between the 7 * main unix code and the driver. 8 * The initialization of the 9 * device switches is in the 10 * file conf.c. 11 */ 12 struct bdevsw 13 { 14 int (*d_open)(); 15 int (*d_close)(); 16 int (*d_strategy)(); 17 int (*d_dump)(); 18 int d_flags; 19 }; 20 #ifdef KERNEL 21 struct bdevsw bdevsw[]; 22 #endif 23 24 /* 25 * Character device switch. 26 */ 27 struct cdevsw 28 { 29 int (*d_open)(); 30 int (*d_close)(); 31 int (*d_read)(); 32 int (*d_write)(); 33 int (*d_ioctl)(); 34 int (*d_stop)(); 35 int (*d_reset)(); 36 struct tty *d_ttys; 37 }; 38 #ifdef KERNEL 39 struct cdevsw cdevsw[]; 40 #endif 41 42 /* 43 * tty line control switch. 44 */ 45 struct linesw 46 { 47 int (*l_open)(); 48 int (*l_close)(); 49 int (*l_read)(); 50 char *(*l_write)(); 51 int (*l_ioctl)(); 52 int (*l_rint)(); 53 int (*l_rend)(); 54 int (*l_meta)(); 55 int (*l_start)(); 56 int (*l_modem)(); 57 }; 58 #ifdef KERNEL 59 struct linesw linesw[]; 60 #endif 61 62 /* 63 * Swap device information 64 */ 65 struct swdevt 66 { 67 dev_t sw_dev; 68 int sw_freed; 69 }; 70 #ifdef KERNEL 71 struct swdevt swdevt[]; 72 #endif 73