Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c
+++ new/usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 #include <sys/modctl.h>
28 28 #include <sys/sunddi.h>
29 29 #include <sys/sunndi.h>
30 30
31 31 /*
32 32 * The hvm_bootstrap misc module is installed in the i86hvm platform
33 33 * directly so it will only be loaded in HVM emulated environment.
34 34 */
35 35
36 36
37 37 /*
38 38 * hvmboot_rootconf() exists to force attach all xdf disk driver nodes
39 39 * before the pv cmdk disk driver comes along and tries to access any of
40 40 * these nodes (which usually happens when mounting the root disk device
41 41 * in an hvm environment). See the block comments at the top of pv_cmdk.c
42 42 * for more information about why this is necessary.
43 43 *
44 44 * hvmboot_rootconf() also force attaches xnf network driver nodes so
45 45 * that boot interface can be plumbed when booted via the network.
46 46 */
47 47 int
48 48 hvmboot_rootconf()
49 49 {
50 50 dev_info_t *xpvd_dip;
51 51 major_t dev_major;
52 52
53 53 dev_major = ddi_name_to_major("xdf");
54 54 if (dev_major == (major_t)-1)
55 55 cmn_err(CE_PANIC, "unable to load xdf disk driver");
56 56
57 57 if (resolve_pathname("/xpvd", &xpvd_dip, NULL, NULL) != 0)
58 58 cmn_err(CE_PANIC, "unable to configure /xpvd nexus");
59 59
60 60 (void) ndi_devi_config_driver(xpvd_dip, 0, dev_major);
61 61
62 62 dev_major = ddi_name_to_major("xnf");
63 63 if (dev_major == (major_t)-1)
64 64 cmn_err(CE_PANIC, "unable to load xnf network driver");
65 65 (void) ndi_devi_config_driver(xpvd_dip, 0, dev_major);
↓ open down ↓ |
65 lines elided |
↑ open up ↑ |
66 66
67 67 ndi_rele_devi(xpvd_dip);
68 68 return (0);
69 69 }
70 70
71 71 static struct modlmisc modlmisc = {
72 72 &mod_miscops, "hvm_bootstrap misc module"
73 73 };
74 74
75 75 static struct modlinkage modlinkage = {
76 - MODREV_1, (void *)&modlmisc, NULL
76 + MODREV_1, { (void *)&modlmisc, NULL }
77 77 };
78 78
79 79 int
80 80 _info(struct modinfo *modinfop)
81 81 {
82 82 return (mod_info(&modlinkage, modinfop));
83 83 }
84 84
85 85 int
86 86 _init()
87 87 {
88 88 return (mod_install(&modlinkage));
89 89 }
90 90
91 91 int
92 92 _fini()
93 93 {
94 94 return (EBUSY);
95 95 }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX