Print this page
fixup .text where possible
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/io/mac/mac_mod.c
+++ new/usr/src/uts/common/io/mac/mac_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, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 -#pragma ident "%Z%%M% %I% %E% SMI"
28 -
29 27 /*
30 28 * MAC Services Module
31 29 */
32 30
33 31 #include <sys/types.h>
34 32 #include <sys/conf.h>
35 33 #include <sys/stat.h>
36 34 #include <sys/stream.h>
37 35 #include <sys/modctl.h>
38 36 #include <sys/atomic.h>
39 37
↓ open down ↓ |
1 lines elided |
↑ open up ↑ |
40 38 #include <sys/mac.h>
41 39 #include <sys/mac_impl.h>
42 40
43 41 static struct modlmisc i_mac_modlmisc = {
44 42 &mod_miscops,
45 43 MAC_INFO
46 44 };
47 45
48 46 static struct modlinkage i_mac_modlinkage = {
49 47 MODREV_1,
50 - &i_mac_modlmisc,
51 - NULL
48 + { &i_mac_modlmisc,
49 + NULL }
52 50 };
53 51
54 52 /*
55 53 * Module initialization functions.
56 54 */
57 55
58 56 static void
59 57 i_mac_mod_init(void)
60 58 {
61 59 mac_init();
62 60 }
63 61
64 62 static int
65 63 i_mac_mod_fini(void)
66 64 {
67 65 int err;
68 66
69 67 if ((err = mac_fini()) != 0)
70 68 return (err);
71 69
72 70 return (0);
73 71 }
74 72
75 73 /*
76 74 * modlinkage functions.
77 75 */
78 76
79 77 int
80 78 _init(void)
81 79 {
82 80 int err;
83 81
84 82 i_mac_mod_init();
85 83
86 84 if ((err = mod_install(&i_mac_modlinkage)) != 0) {
87 85 (void) i_mac_mod_fini();
88 86 return (err);
89 87 }
90 88
91 89 #ifdef DEBUG
92 90 cmn_err(CE_NOTE, "!%s loaded", MAC_INFO);
93 91 #endif /* DEBUG */
94 92
95 93 return (0);
96 94 }
97 95
98 96 int
99 97 _fini(void)
100 98 {
101 99 int err;
102 100
103 101 if ((err = i_mac_mod_fini()) != 0)
104 102 return (err);
105 103
106 104 if ((err = mod_remove(&i_mac_modlinkage)) != 0)
107 105 return (err);
108 106
109 107 #ifdef DEBUG
110 108 cmn_err(CE_NOTE, "!%s unloaded", MAC_INFO);
111 109 #endif /* DEBUG */
112 110
113 111 return (0);
114 112 }
115 113
116 114 int
117 115 _info(struct modinfo *modinfop)
118 116 {
119 117 return (mod_info(&i_mac_modlinkage, modinfop));
120 118 }
↓ open down ↓ |
59 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX