1 /*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)conf.h 7.7 (Berkeley) 03/17/91 8 */ 9 10 struct bdevsw { 11 int (*d_open) __P((dev_t dev, int mode, int devtype, struct proc *p)); 12 int (*d_close) __P((dev_t dev, int fflag, int devtype, struct proc *)); 13 int (*d_strategy) __P((struct buf *bp)); 14 int (*d_ioctl) __P((dev_t dev, int cmd, caddr_t data, int fflag, 15 struct proc *p)); 16 int (*d_dump) __P((dev_t dev)); 17 int (*d_psize) __P((dev_t dev)); 18 int d_flags; 19 }; 20 21 #ifdef KERNEL 22 struct bdevsw bdevsw[]; 23 #endif 24 25 struct cdevsw { 26 int (*d_open) __P((dev_t dev, int mode, int devtype, struct proc *p)); 27 int (*d_close) __P((dev_t dev, int fflag, int devtype, struct proc *)); 28 int (*d_read) __P((dev_t dev, struct uio *uio, int ioflag, 29 struct proc *p)); 30 int (*d_write) __P((dev_t dev, struct uio *uio, int ioflag, 31 struct proc *p)); 32 int (*d_ioctl) __P((dev_t dev, int cmd, caddr_t data, int fflag, 33 struct proc *p)); 34 int (*d_stop) __P((struct tty *tp, int rw)); 35 int (*d_reset) __P((int uban)); /* XXX */ 36 struct tty *d_ttys; 37 int (*d_select) __P((dev_t dev, int which, struct proc *p)); 38 int (*d_mmap) __P((dev_t dev, ...)); 39 int (*d_strategy) __P((struct buf *bp)); 40 }; 41 42 #ifdef KERNEL 43 struct cdevsw cdevsw[]; 44 45 /* symbolic sleep message strings */ 46 extern char devopn[], devio[], devwait[], devin[], devout[]; 47 extern char devioc[], devcls[]; 48 #endif 49 50 struct linesw { 51 int (*l_open)(); 52 int (*l_close)(); 53 int (*l_read)(); 54 int (*l_write)(); 55 int (*l_ioctl)(); 56 int (*l_rint)(); 57 int (*l_rend)(); 58 int (*l_meta)(); 59 int (*l_start)(); 60 int (*l_modem)(); 61 }; 62 63 #ifdef KERNEL 64 struct linesw linesw[]; 65 #endif 66 67 struct swdevt { 68 dev_t sw_dev; 69 int sw_freed; 70 int sw_nblks; 71 struct vnode *sw_vp; 72 }; 73 74 #ifdef KERNEL 75 struct swdevt swdevt[]; 76 #endif 77