diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-01-12 05:33:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:08 -0500 |
commit | 90754f8ec011c91382ece2849a43b8f8aa8a0105 (patch) | |
tree | f7c6a67a69a62d22988a5218d1a2909c32aacf44 /net/ipv4/ipvs/ip_vs_lblcr.c | |
parent | b5ccd792fa413f9336273cb8fa3b9dd3a7ec1735 (diff) |
[IPVS]: Switch to using ctl_paths.
The feature of ipvs ctls is that the net/ipv4/vs path
is common for core ipvs ctls and for two schedulers,
so I make it exported and re-use it in modules.
Two other .c files required linux/sysctl.h to make the
extern declaration of this path compile well.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_lblcr.c')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_lblcr.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c index f50da6411378..daa260eb21cf 100644 --- a/net/ipv4/ipvs/ip_vs_lblcr.c +++ b/net/ipv4/ipvs/ip_vs_lblcr.c | |||
@@ -311,35 +311,6 @@ static ctl_table vs_vars_table[] = { | |||
311 | { .ctl_name = 0 } | 311 | { .ctl_name = 0 } |
312 | }; | 312 | }; |
313 | 313 | ||
314 | static ctl_table vs_table[] = { | ||
315 | { | ||
316 | .procname = "vs", | ||
317 | .mode = 0555, | ||
318 | .child = vs_vars_table | ||
319 | }, | ||
320 | { .ctl_name = 0 } | ||
321 | }; | ||
322 | |||
323 | static ctl_table ipvs_ipv4_table[] = { | ||
324 | { | ||
325 | .ctl_name = NET_IPV4, | ||
326 | .procname = "ipv4", | ||
327 | .mode = 0555, | ||
328 | .child = vs_table | ||
329 | }, | ||
330 | { .ctl_name = 0 } | ||
331 | }; | ||
332 | |||
333 | static ctl_table lblcr_root_table[] = { | ||
334 | { | ||
335 | .ctl_name = CTL_NET, | ||
336 | .procname = "net", | ||
337 | .mode = 0555, | ||
338 | .child = ipvs_ipv4_table | ||
339 | }, | ||
340 | { .ctl_name = 0 } | ||
341 | }; | ||
342 | |||
343 | static struct ctl_table_header * sysctl_header; | 314 | static struct ctl_table_header * sysctl_header; |
344 | 315 | ||
345 | /* | 316 | /* |
@@ -771,7 +742,7 @@ static int __init ip_vs_lblcr_init(void) | |||
771 | int ret; | 742 | int ret; |
772 | 743 | ||
773 | INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list); | 744 | INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list); |
774 | sysctl_header = register_sysctl_table(lblcr_root_table); | 745 | sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars_table); |
775 | ret = register_ip_vs_scheduler(&ip_vs_lblcr_scheduler); | 746 | ret = register_ip_vs_scheduler(&ip_vs_lblcr_scheduler); |
776 | if (ret) | 747 | if (ret) |
777 | unregister_sysctl_table(sysctl_header); | 748 | unregister_sysctl_table(sysctl_header); |