Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/io/dls/dls_mod.c
+++ new/usr/src/uts/common/io/dls/dls_mod.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 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 /*
27 27 * Data-Link Services Module
28 28 */
29 29
↓ open down ↓ |
29 lines elided |
↑ open up ↑ |
30 30 #include <sys/modctl.h>
31 31 #include <sys/dld_impl.h>
32 32
33 33 static struct modlmisc i_dls_modlmisc = {
34 34 &mod_miscops,
35 35 DLS_INFO
36 36 };
37 37
38 38 static struct modlinkage i_dls_modlinkage = {
39 39 MODREV_1,
40 - &i_dls_modlmisc,
41 - NULL
40 + { &i_dls_modlmisc, NULL }
42 41 };
43 42
44 43 /*
45 44 * Module initialization functions.
46 45 */
47 46
48 47 static void
49 48 i_dls_mod_init(void)
50 49 {
51 50 dls_link_init();
52 51 dls_mgmt_init();
53 52 }
54 53
55 54 static int
56 55 i_dls_mod_fini(void)
57 56 {
58 57 int err;
59 58
60 59 if ((err = dls_link_fini()) != 0)
61 60 return (err);
62 61
63 62 dls_mgmt_fini();
64 63 return (0);
65 64 }
66 65
67 66 /*
68 67 * modlinkage functions.
69 68 */
70 69
71 70 int
72 71 _init(void)
73 72 {
74 73 int err;
75 74
76 75 i_dls_mod_init();
77 76
78 77 if ((err = mod_install(&i_dls_modlinkage)) != 0) {
79 78 (void) i_dls_mod_fini();
80 79 return (err);
81 80 }
82 81
83 82 #ifdef DEBUG
84 83 cmn_err(CE_NOTE, "!%s loaded", DLS_INFO);
85 84 #endif /* DEBUG */
86 85
87 86 return (0);
88 87 }
89 88
90 89 int
91 90 _fini(void)
92 91 {
93 92 int err;
94 93
95 94 if ((err = i_dls_mod_fini()) != 0)
96 95 return (err);
97 96
98 97 if ((err = mod_remove(&i_dls_modlinkage)) != 0)
99 98 return (err);
100 99
101 100 #ifdef DEBUG
102 101 cmn_err(CE_NOTE, "!%s unloaded", DLS_INFO);
103 102 #endif /* DEBUG */
104 103
105 104 return (0);
106 105 }
107 106
108 107 int
109 108 _info(struct modinfo *modinfop)
110 109 {
111 110 return (mod_info(&i_dls_modlinkage, modinfop));
112 111 }
↓ open down ↓ |
61 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX