diff options
author | Per Liden <per.liden@ericsson.com> | 2006-01-17 18:38:21 -0500 |
---|---|---|
committer | Per Liden <per.liden@ericsson.com> | 2006-01-17 18:45:16 -0500 |
commit | 4323add67792ced172d0d93b8b2e6187023115f1 (patch) | |
tree | 13224010f6f18029fb710a1e0b48392aea90b486 /net/tipc/core.c | |
parent | 1e63e681e06d438fdc542d40924a4f155d461bbd (diff) |
[TIPC] Avoid polluting the global namespace
This patch adds a tipc_ prefix to all externally visible symbols.
Signed-off-by: Per Liden <per.liden@ericsson.com>
Diffstat (limited to 'net/tipc/core.c')
-rw-r--r-- | net/tipc/core.c | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c index 9a1ab178b446..3d0a8ee4e1d3 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c | |||
@@ -48,14 +48,14 @@ | |||
48 | #include "subscr.h" | 48 | #include "subscr.h" |
49 | #include "config.h" | 49 | #include "config.h" |
50 | 50 | ||
51 | int eth_media_start(void); | 51 | int tipc_eth_media_start(void); |
52 | void eth_media_stop(void); | 52 | void tipc_eth_media_stop(void); |
53 | int handler_start(void); | 53 | int tipc_handler_start(void); |
54 | void handler_stop(void); | 54 | void tipc_handler_stop(void); |
55 | int socket_init(void); | 55 | int tipc_socket_init(void); |
56 | void socket_stop(void); | 56 | void tipc_socket_stop(void); |
57 | int netlink_start(void); | 57 | int tipc_netlink_start(void); |
58 | void netlink_stop(void); | 58 | void tipc_netlink_stop(void); |
59 | 59 | ||
60 | #define MOD_NAME "tipc_start: " | 60 | #define MOD_NAME "tipc_start: " |
61 | 61 | ||
@@ -112,56 +112,56 @@ int tipc_get_mode(void) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * stop_net - shut down TIPC networking sub-systems | 115 | * tipc_core_stop_net - shut down TIPC networking sub-systems |
116 | */ | 116 | */ |
117 | 117 | ||
118 | void stop_net(void) | 118 | void tipc_core_stop_net(void) |
119 | { | 119 | { |
120 | eth_media_stop(); | 120 | tipc_eth_media_stop(); |
121 | tipc_stop_net(); | 121 | tipc_net_stop(); |
122 | } | 122 | } |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * start_net - start TIPC networking sub-systems | 125 | * start_net - start TIPC networking sub-systems |
126 | */ | 126 | */ |
127 | 127 | ||
128 | int start_net(void) | 128 | int tipc_core_start_net(void) |
129 | { | 129 | { |
130 | int res; | 130 | int res; |
131 | 131 | ||
132 | if ((res = tipc_start_net()) || | 132 | if ((res = tipc_net_start()) || |
133 | (res = eth_media_start())) { | 133 | (res = tipc_eth_media_start())) { |
134 | stop_net(); | 134 | tipc_core_stop_net(); |
135 | } | 135 | } |
136 | return res; | 136 | return res; |
137 | } | 137 | } |
138 | 138 | ||
139 | /** | 139 | /** |
140 | * stop_core - switch TIPC from SINGLE NODE to NOT RUNNING mode | 140 | * tipc_core_stop - switch TIPC from SINGLE NODE to NOT RUNNING mode |
141 | */ | 141 | */ |
142 | 142 | ||
143 | void stop_core(void) | 143 | void tipc_core_stop(void) |
144 | { | 144 | { |
145 | if (tipc_mode != TIPC_NODE_MODE) | 145 | if (tipc_mode != TIPC_NODE_MODE) |
146 | return; | 146 | return; |
147 | 147 | ||
148 | tipc_mode = TIPC_NOT_RUNNING; | 148 | tipc_mode = TIPC_NOT_RUNNING; |
149 | 149 | ||
150 | netlink_stop(); | 150 | tipc_netlink_stop(); |
151 | handler_stop(); | 151 | tipc_handler_stop(); |
152 | cfg_stop(); | 152 | tipc_cfg_stop(); |
153 | subscr_stop(); | 153 | tipc_subscr_stop(); |
154 | reg_stop(); | 154 | tipc_reg_stop(); |
155 | nametbl_stop(); | 155 | tipc_nametbl_stop(); |
156 | ref_table_stop(); | 156 | tipc_ref_table_stop(); |
157 | socket_stop(); | 157 | tipc_socket_stop(); |
158 | } | 158 | } |
159 | 159 | ||
160 | /** | 160 | /** |
161 | * start_core - switch TIPC from NOT RUNNING to SINGLE NODE mode | 161 | * tipc_core_start - switch TIPC from NOT RUNNING to SINGLE NODE mode |
162 | */ | 162 | */ |
163 | 163 | ||
164 | int start_core(void) | 164 | int tipc_core_start(void) |
165 | { | 165 | { |
166 | int res; | 166 | int res; |
167 | 167 | ||
@@ -171,16 +171,16 @@ int start_core(void) | |||
171 | get_random_bytes(&tipc_random, sizeof(tipc_random)); | 171 | get_random_bytes(&tipc_random, sizeof(tipc_random)); |
172 | tipc_mode = TIPC_NODE_MODE; | 172 | tipc_mode = TIPC_NODE_MODE; |
173 | 173 | ||
174 | if ((res = handler_start()) || | 174 | if ((res = tipc_handler_start()) || |
175 | (res = ref_table_init(tipc_max_ports + tipc_max_subscriptions, | 175 | (res = tipc_ref_table_init(tipc_max_ports + tipc_max_subscriptions, |
176 | tipc_random)) || | 176 | tipc_random)) || |
177 | (res = reg_start()) || | 177 | (res = tipc_reg_start()) || |
178 | (res = nametbl_init()) || | 178 | (res = tipc_nametbl_init()) || |
179 | (res = k_signal((Handler)subscr_start, 0)) || | 179 | (res = tipc_k_signal((Handler)tipc_subscr_start, 0)) || |
180 | (res = k_signal((Handler)cfg_init, 0)) || | 180 | (res = tipc_k_signal((Handler)tipc_cfg_init, 0)) || |
181 | (res = netlink_start()) || | 181 | (res = tipc_netlink_start()) || |
182 | (res = socket_init())) { | 182 | (res = tipc_socket_init())) { |
183 | stop_core(); | 183 | tipc_core_stop(); |
184 | } | 184 | } |
185 | return res; | 185 | return res; |
186 | } | 186 | } |
@@ -190,7 +190,7 @@ static int __init tipc_init(void) | |||
190 | { | 190 | { |
191 | int res; | 191 | int res; |
192 | 192 | ||
193 | log_reinit(CONFIG_TIPC_LOG); | 193 | tipc_log_reinit(CONFIG_TIPC_LOG); |
194 | info("Activated (compiled " __DATE__ " " __TIME__ ")\n"); | 194 | info("Activated (compiled " __DATE__ " " __TIME__ ")\n"); |
195 | 195 | ||
196 | tipc_own_addr = 0; | 196 | tipc_own_addr = 0; |
@@ -204,7 +204,7 @@ static int __init tipc_init(void) | |||
204 | tipc_max_slaves = delimit(CONFIG_TIPC_SLAVE_NODES, 0, 2047); | 204 | tipc_max_slaves = delimit(CONFIG_TIPC_SLAVE_NODES, 0, 2047); |
205 | tipc_net_id = 4711; | 205 | tipc_net_id = 4711; |
206 | 206 | ||
207 | if ((res = start_core())) | 207 | if ((res = tipc_core_start())) |
208 | err("Unable to start in single node mode\n"); | 208 | err("Unable to start in single node mode\n"); |
209 | else | 209 | else |
210 | info("Started in single node mode\n"); | 210 | info("Started in single node mode\n"); |
@@ -213,10 +213,10 @@ static int __init tipc_init(void) | |||
213 | 213 | ||
214 | static void __exit tipc_exit(void) | 214 | static void __exit tipc_exit(void) |
215 | { | 215 | { |
216 | stop_net(); | 216 | tipc_core_stop_net(); |
217 | stop_core(); | 217 | tipc_core_stop(); |
218 | info("Deactivated\n"); | 218 | info("Deactivated\n"); |
219 | log_stop(); | 219 | tipc_log_stop(); |
220 | } | 220 | } |
221 | 221 | ||
222 | module_init(tipc_init); | 222 | module_init(tipc_init); |