xref: /illumos-gate/usr/src/cmd/format/init_ci386.c (revision 533affcbc7fc4d0c8132976ea454aaa715fe2307)
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  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 /*
27  * This file defines the known controller types.  To add a new controller
28  * type, simply add a new line to the array and define the necessary
29  * ops vector in a 'driver' file.
30  */
31 #include "global.h"
32 #include <sys/dkio.h>
33 
34 extern	struct ctlr_ops scsiops;
35 extern	struct ctlr_ops ataops;
36 extern	struct ctlr_ops pcmcia_ataops;
37 extern  struct ctlr_ops genericops;
38 
39 /*
40  * This array defines the supported controller types
41  */
42 struct	ctlr_type ctlr_types[] = {
43 
44 	{ DKC_DIRECT,
45 		"ata",
46 		&ataops,
47 		CF_NOFORMAT | CF_WLIST },
48 
49 	{ DKC_SCSI_CCS,
50 		"SCSI",
51 		&scsiops,
52 		CF_SCSI | CF_EMBEDDED },
53 
54 	{ DKC_PCMCIA_ATA,
55 		"pcmcia",
56 		&pcmcia_ataops,
57 		CF_NOFORMAT | CF_NOWLIST },
58 
59 	{ DKC_VBD,
60 		"virtual-dsk",
61 		&genericops,
62 		CF_NOWLIST },
63 
64 	{ DKC_BLKDEV,
65 		"generic-block-device",
66 		&genericops,
67 		CF_NOWLIST }
68 };
69 
70 /*
71  * This variable is used to count the entries in the array so its
72  * size is not hard-wired anywhere.
73  */
74 int	nctypes = sizeof (ctlr_types) / sizeof (struct ctlr_type);
75