diff options
| author | Pavel Emelyanov <xemul@openvz.org> | 2008-01-09 03:30:05 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:07 -0500 |
| commit | b5ccd792fa413f9336273cb8fa3b9dd3a7ec1735 (patch) | |
| tree | 64b23972fdf667baa74a0895bf403b22eb7de86c | |
| parent | cb7928a528264a69b29b6001b490b64607ed0557 (diff) | |
[NET]: Simple ctl_table to ctl_path conversions.
This patch includes many places, that only required
replacing the ctl_table-s with appropriate ctl_paths
and call register_sysctl_paths().
Nothing special was done with them.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/appletalk/sysctl_net_atalk.c | 24 | ||||
| -rw-r--r-- | net/bridge/br_netfilter.c | 24 | ||||
| -rw-r--r-- | net/dccp/sysctl.c | 36 | ||||
| -rw-r--r-- | net/ipx/sysctl_net_ipx.c | 24 | ||||
| -rw-r--r-- | net/irda/irsysctl.c | 28 | ||||
| -rw-r--r-- | net/llc/sysctl_net_llc.c | 24 | ||||
| -rw-r--r-- | net/netrom/sysctl_net_netrom.c | 24 | ||||
| -rw-r--r-- | net/rose/sysctl_net_rose.c | 24 | ||||
| -rw-r--r-- | net/sctp/sysctl.c | 24 | ||||
| -rw-r--r-- | net/x25/sysctl_net_x25.c | 24 |
10 files changed, 52 insertions, 204 deletions
diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c index 7df1778e221a..621805dfa2f4 100644 --- a/net/appletalk/sysctl_net_atalk.c +++ b/net/appletalk/sysctl_net_atalk.c | |||
| @@ -49,31 +49,17 @@ static struct ctl_table atalk_table[] = { | |||
| 49 | { 0 }, | 49 | { 0 }, |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | static struct ctl_table atalk_dir_table[] = { | 52 | static struct ctl_path atalk_path[] = { |
| 53 | { | 53 | { .procname = "net", .ctl_name = CTL_NET, }, |
| 54 | .ctl_name = NET_ATALK, | 54 | { .procname = "appletalk", .ctl_name = NET_ATALK, }, |
| 55 | .procname = "appletalk", | 55 | { } |
| 56 | .mode = 0555, | ||
| 57 | .child = atalk_table, | ||
| 58 | }, | ||
| 59 | { 0 }, | ||
| 60 | }; | ||
| 61 | |||
| 62 | static struct ctl_table atalk_root_table[] = { | ||
| 63 | { | ||
| 64 | .ctl_name = CTL_NET, | ||
| 65 | .procname = "net", | ||
| 66 | .mode = 0555, | ||
| 67 | .child = atalk_dir_table, | ||
| 68 | }, | ||
| 69 | { 0 }, | ||
| 70 | }; | 56 | }; |
| 71 | 57 | ||
| 72 | static struct ctl_table_header *atalk_table_header; | 58 | static struct ctl_table_header *atalk_table_header; |
| 73 | 59 | ||
| 74 | void atalk_register_sysctl(void) | 60 | void atalk_register_sysctl(void) |
| 75 | { | 61 | { |
| 76 | atalk_table_header = register_sysctl_table(atalk_root_table); | 62 | atalk_table_header = register_sysctl_paths(atalk_path, atalk_table); |
| 77 | } | 63 | } |
| 78 | 64 | ||
| 79 | void atalk_unregister_sysctl(void) | 65 | void atalk_unregister_sysctl(void) |
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index 859fe4d86698..141f069e77a0 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
| @@ -967,24 +967,10 @@ static ctl_table brnf_table[] = { | |||
| 967 | { .ctl_name = 0 } | 967 | { .ctl_name = 0 } |
| 968 | }; | 968 | }; |
| 969 | 969 | ||
| 970 | static ctl_table brnf_bridge_table[] = { | 970 | static struct ctl_path brnf_path[] = { |
| 971 | { | 971 | { .procname = "net", .ctl_name = CTL_NET, }, |
| 972 | .ctl_name = NET_BRIDGE, | 972 | { .procname = "bridge", .ctl_name = NET_BRIDGE, }, |
| 973 | .procname = "bridge", | 973 | { } |
| 974 | .mode = 0555, | ||
| 975 | .child = brnf_table, | ||
| 976 | }, | ||
| 977 | { .ctl_name = 0 } | ||
| 978 | }; | ||
| 979 | |||
| 980 | static ctl_table brnf_net_table[] = { | ||
| 981 | { | ||
| 982 | .ctl_name = CTL_NET, | ||
| 983 | .procname = "net", | ||
| 984 | .mode = 0555, | ||
| 985 | .child = brnf_bridge_table, | ||
| 986 | }, | ||
| 987 | { .ctl_name = 0 } | ||
| 988 | }; | 974 | }; |
| 989 | #endif | 975 | #endif |
| 990 | 976 | ||
| @@ -996,7 +982,7 @@ int __init br_netfilter_init(void) | |||
| 996 | if (ret < 0) | 982 | if (ret < 0) |
| 997 | return ret; | 983 | return ret; |
| 998 | #ifdef CONFIG_SYSCTL | 984 | #ifdef CONFIG_SYSCTL |
| 999 | brnf_sysctl_header = register_sysctl_table(brnf_net_table); | 985 | brnf_sysctl_header = register_sysctl_paths(brnf_path, brnf_table); |
| 1000 | if (brnf_sysctl_header == NULL) { | 986 | if (brnf_sysctl_header == NULL) { |
| 1001 | printk(KERN_WARNING | 987 | printk(KERN_WARNING |
| 1002 | "br_netfilter: can't register to sysctl.\n"); | 988 | "br_netfilter: can't register to sysctl.\n"); |
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c index c62c05039f69..21295993fdb8 100644 --- a/net/dccp/sysctl.c +++ b/net/dccp/sysctl.c | |||
| @@ -100,41 +100,19 @@ static struct ctl_table dccp_default_table[] = { | |||
| 100 | { .ctl_name = 0, } | 100 | { .ctl_name = 0, } |
| 101 | }; | 101 | }; |
| 102 | 102 | ||
| 103 | static struct ctl_table dccp_table[] = { | 103 | static struct ctl_path dccp_path[] = { |
| 104 | { | 104 | { .procname = "net", .ctl_name = CTL_NET, }, |
| 105 | .ctl_name = NET_DCCP_DEFAULT, | 105 | { .procname = "dccp", .ctl_name = NET_DCCP, }, |
| 106 | .procname = "default", | 106 | { .procname = "default", .ctl_name = NET_DCCP_DEFAULT, }, |
| 107 | .mode = 0555, | 107 | { } |
| 108 | .child = dccp_default_table, | ||
| 109 | }, | ||
| 110 | { .ctl_name = 0, }, | ||
| 111 | }; | ||
| 112 | |||
| 113 | static struct ctl_table dccp_dir_table[] = { | ||
| 114 | { | ||
| 115 | .ctl_name = NET_DCCP, | ||
| 116 | .procname = "dccp", | ||
| 117 | .mode = 0555, | ||
| 118 | .child = dccp_table, | ||
| 119 | }, | ||
| 120 | { .ctl_name = 0, }, | ||
| 121 | }; | ||
| 122 | |||
| 123 | static struct ctl_table dccp_root_table[] = { | ||
| 124 | { | ||
| 125 | .ctl_name = CTL_NET, | ||
| 126 | .procname = "net", | ||
| 127 | .mode = 0555, | ||
| 128 | .child = dccp_dir_table, | ||
| 129 | }, | ||
| 130 | { .ctl_name = 0, }, | ||
| 131 | }; | 108 | }; |
| 132 | 109 | ||
| 133 | static struct ctl_table_header *dccp_table_header; | 110 | static struct ctl_table_header *dccp_table_header; |
| 134 | 111 | ||
| 135 | int __init dccp_sysctl_init(void) | 112 | int __init dccp_sysctl_init(void) |
| 136 | { | 113 | { |
| 137 | dccp_table_header = register_sysctl_table(dccp_root_table); | 114 | dccp_table_header = register_sysctl_paths(dccp_path, |
| 115 | dccp_default_table); | ||
| 138 | 116 | ||
| 139 | return dccp_table_header != NULL ? 0 : -ENOMEM; | 117 | return dccp_table_header != NULL ? 0 : -ENOMEM; |
| 140 | } | 118 | } |
diff --git a/net/ipx/sysctl_net_ipx.c b/net/ipx/sysctl_net_ipx.c index 0cf526450536..92fef864e852 100644 --- a/net/ipx/sysctl_net_ipx.c +++ b/net/ipx/sysctl_net_ipx.c | |||
| @@ -28,31 +28,17 @@ static struct ctl_table ipx_table[] = { | |||
| 28 | { 0 }, | 28 | { 0 }, |
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | static struct ctl_table ipx_dir_table[] = { | 31 | static struct ctl_path ipx_path[] = { |
| 32 | { | 32 | { .procname = "net", .ctl_name = CTL_NET, }, |
| 33 | .ctl_name = NET_IPX, | 33 | { .procname = "ipx", .ctl_name = NET_IPX, }, |
| 34 | .procname = "ipx", | 34 | { } |
| 35 | .mode = 0555, | ||
| 36 | .child = ipx_table, | ||
| 37 | }, | ||
| 38 | { 0 }, | ||
| 39 | }; | ||
| 40 | |||
| 41 | static struct ctl_table ipx_root_table[] = { | ||
| 42 | { | ||
| 43 | .ctl_name = CTL_NET, | ||
| 44 | .procname = "net", | ||
| 45 | .mode = 0555, | ||
| 46 | .child = ipx_dir_table, | ||
| 47 | }, | ||
| 48 | { 0 }, | ||
| 49 | }; | 35 | }; |
| 50 | 36 | ||
| 51 | static struct ctl_table_header *ipx_table_header; | 37 | static struct ctl_table_header *ipx_table_header; |
| 52 | 38 | ||
| 53 | void ipx_register_sysctl(void) | 39 | void ipx_register_sysctl(void) |
| 54 | { | 40 | { |
| 55 | ipx_table_header = register_sysctl_table(ipx_root_table); | 41 | ipx_table_header = register_sysctl_paths(ipx_path, ipx_table); |
| 56 | } | 42 | } |
| 57 | 43 | ||
| 58 | void ipx_unregister_sysctl(void) | 44 | void ipx_unregister_sysctl(void) |
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c index 565cbf0421cd..d8aba869ff11 100644 --- a/net/irda/irsysctl.c +++ b/net/irda/irsysctl.c | |||
| @@ -234,28 +234,10 @@ static ctl_table irda_table[] = { | |||
| 234 | { .ctl_name = 0 } | 234 | { .ctl_name = 0 } |
| 235 | }; | 235 | }; |
| 236 | 236 | ||
| 237 | /* One directory */ | 237 | static struct ctl_path irda_path[] = { |
| 238 | static ctl_table irda_net_table[] = { | 238 | { .procname = "net", .ctl_name = CTL_NET, }, |
| 239 | { | 239 | { .procname = "irda", .ctl_name = NET_IRDA, }, |
| 240 | .ctl_name = NET_IRDA, | 240 | { } |
| 241 | .procname = "irda", | ||
| 242 | .maxlen = 0, | ||
| 243 | .mode = 0555, | ||
| 244 | .child = irda_table | ||
