Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/fs/sockfs/sockvfsops.c
+++ new/usr/src/uts/common/fs/sockfs/sockvfsops.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 (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 */
24 24
25 25 #include <sys/types.h>
26 26 #include <sys/t_lock.h>
27 27 #include <sys/param.h>
28 28 #include <sys/systm.h>
29 29 #include <sys/buf.h>
30 30 #include <sys/cmn_err.h>
31 31 #include <sys/debug.h>
32 32 #include <sys/errno.h>
33 33 #include <sys/vfs.h>
34 34 #include <sys/swap.h>
35 35 #include <sys/vnode.h>
36 36 #include <sys/cred.h>
37 37 #include <sys/thread.h>
38 38 #include <sys/zone.h>
39 39
40 40 #include <fs/fs_subr.h>
41 41
42 42 #include <sys/stream.h>
43 43 #include <sys/socket.h>
44 44 #include <sys/stropts.h>
45 45 #include <sys/socketvar.h>
46 46
47 47 /*
48 48 * This is the loadable module wrapper.
49 49 */
50 50 #include <sys/modctl.h>
51 51
52 52 static zone_key_t sockfs_zone_key;
53 53
54 54 static vfsdef_t vfw = {
55 55 VFSDEF_VERSION,
56 56 "sockfs",
57 57 sockinit,
58 58 VSW_ZMOUNT,
59 59 NULL
60 60 };
61 61
↓ open down ↓ |
61 lines elided |
↑ open up ↑ |
62 62 extern struct mod_ops mod_fsops;
63 63
64 64 /*
65 65 * Module linkage information for the kernel.
66 66 */
67 67 static struct modlfs modlfs = {
68 68 &mod_fsops, "filesystem for sockfs", &vfw
69 69 };
70 70
71 71 static struct modlinkage modlinkage = {
72 - MODREV_1, (void *)&modlfs, NULL
72 + MODREV_1, { (void *)&modlfs, NULL }
73 73 };
74 74
75 75 int
76 76 _init(void)
77 77 {
78 78 int ret;
79 79
80 80 /*
81 81 * We want to be informed each time a zone is created or
82 82 * destroyed in the kernel, so we can maintain per-zone
83 83 * kstat. sock_kstat_init() will also be called for the
84 84 * global zone, without us having to special case it here.
85 85 */
86 86 zone_key_create(&sockfs_zone_key,
87 87 sock_kstat_init, NULL, sock_kstat_fini);
88 88
89 89 if ((ret = mod_install(&modlinkage)) != 0) {
90 90 (void) zone_key_delete(sockfs_zone_key);
91 91 }
92 92
93 93 return (ret);
94 94 }
95 95
96 96 int
97 97 _info(struct modinfo *modinfop)
98 98 {
99 99 return (mod_info(&modlinkage, modinfop));
100 100 }
101 101
102 102 int
103 103 _fini(void)
104 104 {
105 105 /* zone_key_delete(sockfs_zone_key); - if we were ever to be unloaded */
106 106
107 107 return (EBUSY);
108 108 }
109 109
110 110 /*
111 111 * N.B.
112 112 * No _fini routine. This module cannot be unloaded once loaded.
113 113 * The NO_UNLOAD_STUB in modstub.s must change if this module ever
114 114 * is modified to become unloadable.
115 115 */
↓ open down ↓ |
33 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX