xref: /illumos-gate/usr/src/uts/common/io/conf.c (revision 19397407)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
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 	NULL,			/* power */
80 	ddi_quiesce_not_needed,		/* quiesce */
81 };
82 
83 struct dev_ops	**devopsp;
84 
85 int	devcnt;
86