Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/avs/ns/rdc/rdc_stub.c
+++ new/usr/src/uts/common/avs/ns/rdc/rdc_stub.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 2009 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 #include <sys/types.h>
27 27 #include <sys/cmn_err.h>
28 28 #include <sys/modctl.h>
29 29 #include <sys/errno.h>
30 30
31 31 #include <rpc/auth.h>
32 32 #include <rpc/svc.h>
33 33
34 34 #include <sys/nsctl/nsctl.h>
35 35 #include <sys/nsctl/nsvers.h>
36 36 #include "rdc_stub.h"
37 37
38 38 static void null_dispatch(struct svc_req *req, SVCXPRT *xprt);
39 39 static void (*dispatch)(struct svc_req *, SVCXPRT *) = null_dispatch;
40 40
41 41 /*
42 42 * Solaris module setup.
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
43 43 */
44 44 extern struct mod_ops mod_miscops;
45 45
46 46 static struct modlmisc modlmisc = {
47 47 &mod_miscops, /* Type of module */
48 48 "nws:Remote Mirror kRPC Stub:" ISS_VERSION_STR
49 49 };
50 50
51 51 static struct modlinkage modlinkage = {
52 52 MODREV_1,
53 - &modlmisc,
54 - NULL
53 + { &modlmisc, NULL }
55 54 };
56 55
57 56
58 57 int
59 58 _init(void)
60 59 {
61 60 return (mod_install(&modlinkage));
62 61 }
63 62
64 63
65 64 int
66 65 _fini(void)
67 66 {
68 67 /* unload is forbidden */
69 68 return (EBUSY);
70 69 }
71 70
72 71
73 72 int
74 73 _info(struct modinfo *modinfop)
75 74 {
76 75 return (mod_info(&modlinkage, modinfop));
77 76 }
78 77
79 78
80 79 /*
81 80 * rdcstub_dispatch is the place holder for rdcsrv_dispatch.
82 81 * rdcsrv registers this function as kRPC dispatch function.
83 82 * If rdcsrv is unloaded (uninstall package), then dispatch
84 83 * is set to null_dispatch
85 84 */
86 85 void
87 86 rdcstub_dispatch(struct svc_req *req, SVCXPRT *xprt)
88 87 {
89 88 (*dispatch)(req, xprt);
90 89 }
91 90
92 91 /* ARGSUSED */
93 92 static void
94 93 null_dispatch(struct svc_req *req, SVCXPRT *xprt)
95 94 {
96 95 svcerr_noproc(xprt);
97 96 }
98 97
99 98 void
100 99 rdcstub_set_dispatch(void (*disp)(struct svc_req *, SVCXPRT *))
101 100 {
102 101 ASSERT(disp != NULL);
103 102 dispatch = disp;
104 103 }
105 104
106 105 void
107 106 rdcstub_unset_dispatch()
108 107 {
109 108 dispatch = null_dispatch;
110 109 }
↓ open down ↓ |
46 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX