1 /* 2 * Copyright (c) 1982, 1986, 1990 Regents of the University of California. 3 * All rights reserved. The Berkeley software License Agreement 4 * specifies the terms and conditions for redistribution. 5 * 6 * @(#)conf.h 7.5 (Berkeley) 04/04/90 7 */ 8 9 /* 10 * Declaration of block device 11 * switch. Each entry (row) is 12 * the only link between the 13 * main unix code and the driver. 14 * The initialization of the 15 * device switches is in the 16 * file conf.c. 17 */ 18 struct bdevsw 19 { 20 int (*d_open)(); 21 int (*d_close)(); 22 int (*d_strategy)(); 23 int (*d_ioctl)(); 24 int (*d_dump)(); 25 int (*d_psize)(); 26 int d_flags; 27 }; 28 #ifdef KERNEL 29 struct bdevsw bdevsw[]; 30 #endif 31 32 /* 33 * Character device switch. 34 */ 35 struct cdevsw 36 { 37 int (*d_open)(); 38 int (*d_close)(); 39 int (*d_read)(); 40 int (*d_write)(); 41 int (*d_ioctl)(); 42 int (*d_stop)(); 43 int (*d_reset)(); 44 struct tty *d_ttys; 45 int (*d_select)(); 46 int (*d_mmap)(); 47 int (*d_strategy)(); 48 }; 49 #ifdef KERNEL 50 struct cdevsw cdevsw[]; 51 52 /* symbolic sleep message strings */ 53 extern char devopn[], devio[], devwait[]; 54 extern char devin[], devout[], devioc[], devcls[]; 55 #endif 56 57 /* 58 * tty line control switch. 59 */ 60 struct linesw 61 { 62 int (*l_open)(); 63 int (*l_close)(); 64 int (*l_read)(); 65 int (*l_write)(); 66 int (*l_ioctl)(); 67 int (*l_rint)(); 68 int (*l_rend)(); 69 int (*l_meta)(); 70 int (*l_start)(); 71 int (*l_modem)(); 72 }; 73 #ifdef KERNEL 74 struct linesw linesw[]; 75 #endif 76 77 /* 78 * Swap device information 79 */ 80 struct swdevt 81 { 82 dev_t sw_dev; 83 int sw_freed; 84 int sw_nblks; 85 struct vnode *sw_vp; 86 }; 87 #ifdef KERNEL 88 struct swdevt swdevt[]; 89 #endif 90