xref: /illumos-gate/usr/src/uts/common/io/conf.c (revision 88f8b78a88cbdc6d8c1af5c3e54bc49d25095c98)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1987-1990 by Sun Microsystems, Inc.
24  */
25 
26 #ident	"%Z%%M%	%I%	%E% SMI"	/* from SunOS4.0 5.63	*/
27 
28 #include <sys/types.h>
29 #include <sys/param.h>
30 #include <sys/systm.h>
31 #include <sys/signal.h>
32 #include <sys/buf.h>
33 #include <sys/conf.h>
34 #include <sys/user.h>
35 #include <sys/proc.h>
36 #include <sys/file.h>
37 #include <sys/vnode.h>
38 #include <sys/acct.h>
39 #include <sys/stream.h>
40 #include <sys/ddi.h>
41 #include <sys/sunddi.h>
42 
43 /*
44  * Might need to define no operation routines attach(), detach(),
45  * reset(), probe(), identify() and get_dev_info().
46  */
47 
48 extern int nopropop();
49 
50 struct cb_ops no_cb_ops = {
51 	nodev,		/* open		*/
52 	nodev,		/* close 	*/
53 	nodev,		/* strategy	*/
54 	nodev,		/* print	*/
55 	nodev,		/* dump		*/
56 	nodev,		/* read		*/
57 	nodev,		/* write	*/
58 	nodev,		/* ioctl	*/
59 	nodev,		/* devmap	*/
60 	nodev,		/* mmap		*/
61 	nodev,		/* segmap	*/
62 	nochpoll,	/* chpoll	*/
63 	nopropop,	/* cb_prop_op	*/
64 	0,		/* stream tab	*/
65 	D_NEW | D_MP	/* char/blk driver compatibility flag */
66 };
67 
68 struct dev_ops nodev_ops = {
69 	DEVO_REV,		/* devo_rev	*/
70 	0,			/* refcnt	*/
71 	ddi_no_info,		/* info		*/
72 	nulldev,		/* identify	*/
73 	nulldev,		/* probe	*/
74 	ddifail,		/* attach	*/
75 	nodev,			/* detach	*/
76 	nulldev,		/* reset	*/
77 	&no_cb_ops,		/* character/block driver operations */
78 	(struct bus_ops *)0	/* bus operations for nexus drivers */
79 };
80 
81 struct dev_ops	**devopsp;
82 
83 int	devcnt;
84