|
|
1.1 root 1: /*-
2: * Copyright (c) 1990 The Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms, with or without
6: * modification, are permitted provided that the following conditions
7: * are met:
8: * 1. Redistributions of source code must retain the above copyright
9: * notice, this list of conditions and the following disclaimer.
10: * 2. Redistributions in binary form must reproduce the above copyright
11: * notice, this list of conditions and the following disclaimer in the
12: * documentation and/or other materials provided with the distribution.
13: * 3. All advertising materials mentioning features or use of this software
14: * must display the following acknowledgement:
15: * This product includes software developed by the University of
16: * California, Berkeley and its contributors.
17: * 4. Neither the name of the University nor the names of its contributors
18: * may be used to endorse or promote products derived from this software
19: * without specific prior written permission.
20: *
21: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31: * SUCH DAMAGE.
32: *
1.1.1.2 ! root 33: * from: @(#)conf.h 7.9 (Berkeley) 5/5/91
! 34: * conf.h,v 1.5 1993/06/27 05:59:01 andrew Exp
1.1 root 35: */
36:
1.1.1.2 ! root 37: #ifndef _SYS_CONF_H_
! 38: #define _SYS_CONF_H_
! 39:
1.1 root 40: /*
41: * Definitions of device driver entry switches
42: */
43:
44: #ifdef __STDC__
45: struct tty;
1.1.1.2 ! root 46: struct vnode;
! 47: struct uio;
! 48: struct proc;
1.1 root 49: #endif
50:
51: struct bdevsw {
52: int (*d_open) __P((dev_t dev, int oflags, int devtype,
53: struct proc *p));
54: int (*d_close) __P((dev_t dev, int fflag, int devtype,
55: struct proc *));
56: int (*d_strategy) __P((struct buf *bp));
57: int (*d_ioctl) __P((dev_t dev, int cmd, caddr_t data,
58: int fflag, struct proc *p));
59: int (*d_dump) __P((dev_t dev));
60: int (*d_psize) __P((dev_t dev));
61: int d_flags;
62: };
63:
64: #ifdef KERNEL
65: struct bdevsw bdevsw[];
66: #endif
67:
68: struct cdevsw {
69: int (*d_open) __P((dev_t dev, int oflags, int devtype,
70: struct proc *p));
71: int (*d_close) __P((dev_t dev, int fflag, int devtype,
72: struct proc *));
73: int (*d_read) __P((dev_t dev, struct uio *uio, int ioflag));
74: int (*d_write) __P((dev_t dev, struct uio *uio, int ioflag));
75: int (*d_ioctl) __P((dev_t dev, int cmd, caddr_t data,
76: int fflag, struct proc *p));
77: int (*d_stop) __P((struct tty *tp, int rw));
78: int (*d_reset) __P((int uban)); /* XXX */
1.1.1.2 ! root 79: struct tty **d_ttys;
1.1 root 80: int (*d_select) __P((dev_t dev, int which, struct proc *p));
81: int (*d_mmap) __P(());
82: int (*d_strategy) __P((struct buf *bp));
83: };
84:
85: #ifdef KERNEL
86: struct cdevsw cdevsw[];
87:
88: /* symbolic sleep message strings */
89: extern char devopn[], devio[], devwait[], devin[], devout[];
90: extern char devioc[], devcls[];
91: #endif
92:
93: struct linesw {
1.1.1.2 ! root 94: int (*l_open) __P((dev_t dev, struct tty *tp));
! 95: void (*l_close) __P((struct tty *tp, int flag));
! 96: int (*l_read) __P((struct tty *tp, struct uio *uio, int flag));
! 97: int (*l_write) __P((struct tty *tp, struct uio *uio, int flag));
! 98: int (*l_ioctl) __P((struct tty *vp, int cmd, caddr_t data, int flag));
! 99: void (*l_rint) __P((int data, struct tty *tp));
1.1 root 100: int (*l_rend)();
101: int (*l_meta)();
1.1.1.2 ! root 102: void (*l_start) __P((struct tty *));
! 103: int (*l_modem) __P((struct tty *tp, int flag));
1.1 root 104: };
105:
106: #ifdef KERNEL
107: struct linesw linesw[];
108: #endif
109:
110: struct swdevt {
111: dev_t sw_dev;
112: int sw_freed;
113: int sw_nblks;
114: struct vnode *sw_vp;
115: };
116:
117: #ifdef KERNEL
118: struct swdevt swdevt[];
119: #endif
1.1.1.2 ! root 120:
! 121: #endif /* !_SYS_CONF_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.