diff options
| author | Jan Beulich <jbeulich@novell.com> | 2008-02-08 07:19:57 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:31 -0500 |
| commit | 8b21985c91ffb3062bfbd3f2bfbeceb5333afaac (patch) | |
| tree | 76648de1b28409def2453fbc92d67f35133a32f3 /kernel | |
| parent | edde08f2a8f13a648ab6d26f33e88d0c6146f3d1 (diff) | |
constify tables in kernel/sysctl_check.c
Remains the question whether it is intended that many, perhaps even large,
tables are compiled in without ever having a chance to get used, i.e.
whether there shouldn't #ifdef CONFIG_xxx get added.
[akpm@linux-foundation.org: fix cut-n-paste error]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sysctl_check.c | 151 |
1 files changed, 75 insertions, 76 deletions
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index 006365b69eaf..c09350d564f2 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c | |||
| @@ -8,10 +8,10 @@ | |||
| 8 | struct trans_ctl_table { | 8 | struct trans_ctl_table { |
| 9 | int ctl_name; | 9 | int ctl_name; |
| 10 | const char *procname; | 10 | const char *procname; |
| 11 | struct trans_ctl_table *child; | 11 | const struct trans_ctl_table *child; |
| 12 | }; | 12 | }; |
| 13 | 13 | ||
| 14 | static struct trans_ctl_table trans_random_table[] = { | 14 | static const struct trans_ctl_table trans_random_table[] = { |
| 15 | { RANDOM_POOLSIZE, "poolsize" }, | 15 | { RANDOM_POOLSIZE, "poolsize" }, |
| 16 | { RANDOM_ENTROPY_COUNT, "entropy_avail" }, | 16 | { RANDOM_ENTROPY_COUNT, "entropy_avail" }, |
| 17 | { RANDOM_READ_THRESH, "read_wakeup_threshold" }, | 17 | { RANDOM_READ_THRESH, "read_wakeup_threshold" }, |
| @@ -21,13 +21,13 @@ static struct trans_ctl_table trans_random_table[] = { | |||
| 21 | {} | 21 | {} |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | static struct trans_ctl_table trans_pty_table[] = { | 24 | static const struct trans_ctl_table trans_pty_table[] = { |
| 25 | { PTY_MAX, "max" }, | 25 | { PTY_MAX, "max" }, |
| 26 | { PTY_NR, "nr" }, | 26 | { PTY_NR, "nr" }, |
| 27 | {} | 27 | {} |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | static struct trans_ctl_table trans_kern_table[] = { | 30 | static const struct trans_ctl_table trans_kern_table[] = { |
| 31 | { KERN_OSTYPE, "ostype" }, | 31 | { KERN_OSTYPE, "ostype" }, |
| 32 | { KERN_OSRELEASE, "osrelease" }, | 32 | { KERN_OSRELEASE, "osrelease" }, |
| 33 | /* KERN_OSREV not used */ | 33 | /* KERN_OSREV not used */ |
| @@ -107,7 +107,7 @@ static struct trans_ctl_table trans_kern_table[] = { | |||
| 107 | {} | 107 | {} |
| 108 | }; | 108 | }; |
| 109 | 109 | ||
| 110 | static struct trans_ctl_table trans_vm_table[] = { | 110 | static const struct trans_ctl_table trans_vm_table[] = { |
| 111 | { VM_OVERCOMMIT_MEMORY, "overcommit_memory" }, | 111 | { VM_OVERCOMMIT_MEMORY, "overcommit_memory" }, |
| 112 | { VM_PAGE_CLUSTER, "page-cluster" }, | 112 | { VM_PAGE_CLUSTER, "page-cluster" }, |
| 113 | { VM_DIRTY_BACKGROUND, "dirty_background_ratio" }, | 113 | { VM_DIRTY_BACKGROUND, "dirty_background_ratio" }, |
| @@ -139,7 +139,7 @@ static struct trans_ctl_table trans_vm_table[] = { | |||
| 139 | {} | 139 | {} |
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| 142 | static struct trans_ctl_table trans_net_core_table[] = { | 142 | static const struct trans_ctl_table trans_net_core_table[] = { |
| 143 | { NET_CORE_WMEM_MAX, "wmem_max" }, | 143 | { NET_CORE_WMEM_MAX, "wmem_max" }, |
| 144 | { NET_CORE_RMEM_MAX, "rmem_max" }, | 144 | { NET_CORE_RMEM_MAX, "rmem_max" }, |
| 145 | { NET_CORE_WMEM_DEFAULT, "wmem_default" }, | 145 | { NET_CORE_WMEM_DEFAULT, "wmem_default" }, |
| @@ -165,14 +165,14 @@ static struct trans_ctl_table trans_net_core_table[] = { | |||
| 165 | {}, | 165 | {}, |
| 166 | }; | 166 | }; |
| 167 | 167 | ||
| 168 | static struct trans_ctl_table trans_net_unix_table[] = { | 168 | static const struct trans_ctl_table trans_net_unix_table[] = { |
| 169 | /* NET_UNIX_DESTROY_DELAY unused */ | 169 | /* NET_UNIX_DESTROY_DELAY unused */ |
| 170 | /* NET_UNIX_DELETE_DELAY unused */ | 170 | /* NET_UNIX_DELETE_DELAY unused */ |
| 171 | { NET_UNIX_MAX_DGRAM_QLEN, "max_dgram_qlen" }, | 171 | { NET_UNIX_MAX_DGRAM_QLEN, "max_dgram_qlen" }, |
| 172 | {} | 172 | {} |
| 173 | }; | 173 | }; |
| 174 | 174 | ||
| 175 | static struct trans_ctl_table trans_net_ipv4_route_table[] = { | 175 | static const struct trans_ctl_table trans_net_ipv4_route_table[] = { |
| 176 | { NET_IPV4_ROUTE_FLUSH, "flush" }, | 176 | { NET_IPV4_ROUTE_FLUSH, "flush" }, |
| 177 | { NET_IPV4_ROUTE_MIN_DELAY, "min_delay" }, | 177 | { NET_IPV4_ROUTE_MIN_DELAY, "min_delay" }, |
| 178 | { NET_IPV4_ROUTE_MAX_DELAY, "max_delay" }, | 178 | { NET_IPV4_ROUTE_MAX_DELAY, "max_delay" }, |
| @@ -195,7 +195,7 @@ static struct trans_ctl_table trans_net_ipv4_route_table[] = { | |||
| 195 | {} | 195 | {} |
| 196 | }; | 196 | }; |
| 197 | 197 | ||
| 198 | static struct trans_ctl_table trans_net_ipv4_conf_vars_table[] = { | 198 | static const struct trans_ctl_table trans_net_ipv4_conf_vars_table[] = { |
| 199 | { NET_IPV4_CONF_FORWARDING, "forwarding" }, | 199 | { NET_IPV4_CONF_FORWARDING, "forwarding" }, |
| 200 | { NET_IPV4_CONF_MC_FORWARDING, "mc_forwarding" }, | 200 | { NET_IPV4_CONF_MC_FORWARDING, "mc_forwarding" }, |
| 201 | 201 | ||
| @@ -222,14 +222,14 @@ static struct trans_ctl_table trans_net_ipv4_conf_vars_table[] = { | |||
| 222 | {} | 222 | {} |
| 223 | }; | 223 | }; |
| 224 | 224 | ||
| 225 | static struct trans_ctl_table trans_net_ipv4_conf_table[] = { | 225 | static const struct trans_ctl_table trans_net_ipv4_conf_table[] = { |
| 226 | { NET_PROTO_CONF_ALL, "all", trans_net_ipv4_conf_vars_table }, | 226 | { NET_PROTO_CONF_ALL, "all", trans_net_ipv4_conf_vars_table }, |
| 227 | { NET_PROTO_CONF_DEFAULT, "default", trans_net_ipv4_conf_vars_table }, | 227 | { NET_PROTO_CONF_DEFAULT, "default", trans_net_ipv4_conf_vars_table }, |
| 228 | { 0, NULL, trans_net_ipv4_conf_vars_table }, | 228 | { 0, NULL, trans_net_ipv4_conf_vars_table }, |
| 229 | {} | 229 | {} |
| 230 | }; | 230 | }; |
| 231 | 231 | ||
| 232 | static struct trans_ctl_table trans_net_neigh_vars_table[] = { | 232 | static const struct trans_ctl_table trans_net_neigh_vars_table[] = { |
| 233 | { NET_NEIGH_MCAST_SOLICIT, "mcast_solicit" }, | 233 | { NET_NEIGH_MCAST_SOLICIT, "mcast_solicit" }, |
| 234 | { NET_NEIGH_UCAST_SOLICIT, "ucast_solicit" }, | 234 | { NET_NEIGH_UCAST_SOLICIT, "ucast_solicit" }, |
| 235 | { NET_NEIGH_APP_SOLICIT, "app_solicit" }, | 235 | { NET_NEIGH_APP_SOLICIT, "app_solicit" }, |
| @@ -251,13 +251,13 @@ static struct trans_ctl_table trans_net_neigh_vars_table[] = { | |||
| 251 | {} | 251 | {} |
| 252 | }; | 252 | }; |
| 253 | 253 | ||
| 254 | static struct trans_ctl_table trans_net_neigh_table[] = { | 254 | static const struct trans_ctl_table trans_net_neigh_table[] = { |
| 255 | { NET_PROTO_CONF_DEFAULT, "default", trans_net_neigh_vars_table }, | 255 | { NET_PROTO_CONF_DEFAULT, "default", trans_net_neigh_vars_table }, |
| 256 | { 0, NULL, trans_net_neigh_vars_table }, | 256 | { 0, NULL, trans_net_neigh_vars_table }, |
| 257 | {} | 257 | {} |
| 258 | }; | 258 | }; |
| 259 | 259 | ||
| 260 | static struct trans_ctl_table trans_net_ipv4_netfilter_table[] = { | 260 | static const struct trans_ctl_table trans_net_ipv4_netfilter_table[] = { |
| 261 | { NET_IPV4_NF_CONNTRACK_MAX, "ip_conntrack_max" }, | 261 | { NET_IPV4_NF_CONNTRACK_MAX, "ip_conntrack_max" }, |
| 262 | 262 | ||
| 263 | { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT, "ip_conntrack_tcp_timeout_syn_sent" }, | 263 | { NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT, "ip_conntrack_tcp_timeout_syn_sent" }, |
| @@ -294,7 +294,7 @@ static struct trans_ctl_table trans_net_ipv4_netfilter_table[] = { | |||
| 294 | {} | 294 | {} |
| 295 | }; | 295 | }; |
| 296 | 296 | ||
| 297 | static struct trans_ctl_table trans_net_ipv4_table[] = { | 297 | static const struct trans_ctl_table trans_net_ipv4_table[] = { |
| 298 | { NET_IPV4_FORWARD, "ip_forward" }, | 298 | { NET_IPV4_FORWARD, "ip_forward" }, |
| 299 | { NET_IPV4_DYNADDR, "ip_dynaddr" }, | 299 | { NET_IPV4_DYNADDR, "ip_dynaddr" }, |
| 300 | 300 | ||
| @@ -393,13 +393,13 @@ static struct trans_ctl_table trans_net_ipv4_table[] = { | |||
| 393 | {} | 393 | {} |
| 394 | }; | 394 | }; |
| 395 | 395 | ||
| 396 | static struct trans_ctl_table trans_net_ipx_table[] = { | 396 | static const struct trans_ctl_table trans_net_ipx_table[] = { |
| 397 | { NET_IPX_PPROP_BROADCASTING, "ipx_pprop_broadcasting" }, | 397 | { NET_IPX_PPROP_BROADCASTING, "ipx_pprop_broadcasting" }, |
| 398 | /* NET_IPX_FORWARDING unused */ | 398 | /* NET_IPX_FORWARDING unused */ |
| 399 | {} | 399 | {} |
| 400 | }; | 400 | }; |
| 401 | 401 | ||
| 402 | static struct trans_ctl_table trans_net_atalk_table[] = { | 402 | static const struct trans_ctl_table trans_net_atalk_table[] = { |
| 403 | { NET_ATALK_AARP_EXPIRY_TIME, "aarp-expiry-time" }, | 403 | { NET_ATALK_AARP_EXPIRY_TIME, "aarp-expiry-time" }, |
| 404 | { NET_ATALK_AARP_TICK_TIME, "aarp-tick-time" }, | 404 | { NET_ATALK_AARP_TICK_TIME, "aarp-tick-time" }, |
| 405 | { NET_ATALK_AARP_RETRANSMIT_LIMIT, "aarp-retransmit-limit" }, | 405 | { NET_ATALK_AARP_RETRANSMIT_LIMIT, "aarp-retransmit-limit" }, |
| @@ -407,7 +407,7 @@ static struct trans_ctl_table trans_net_atalk_table[] = { | |||
| 407 | {}, | 407 | {}, |
| 408 | }; | 408 | }; |
| 409 | 409 | ||
| 410 | static struct trans_ctl_table trans_net_netrom_table[] = { | 410 | static const struct trans_ctl_table trans_net_netrom_table[] = { |
| 411 | { NET_NETROM_DEFAULT_PATH_QUALITY, "default_path_quality" }, | 411 | { NET_NETROM_DEFAULT_PATH_QUALITY, "default_path_quality" }, |
| 412 | { NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER, "obsolescence_count_initialiser" }, | 412 | { NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER, "obsolescence_count_initialiser" }, |
| 413 | { NET_NETROM_NETWORK_TTL_INITIALISER, "network_ttl_initialiser" }, | 413 | { NET_NETROM_NETWORK_TTL_INITIALISER, "network_ttl_initialiser" }, |
| @@ -423,7 +423,7 @@ static struct trans_ctl_table trans_net_netrom_table[] = { | |||
| 423 | {} | 423 | {} |
| 424 | }; | 424 | }; |
| 425 | 425 | ||
| 426 | static struct trans_ctl_table trans_net_ax25_param_table[] = { | 426 | static const struct trans_ctl_table trans_net_ax25_param_table[] = { |
| 427 | { NET_AX25_IP_DEFAULT_MODE, "ip_default_mode" }, | 427 | { NET_AX25_IP_DEFAULT_MODE, "ip_default_mode" }, |
| 428 | { NET_AX25_DEFAULT_MODE, "ax25_default_mode" }, | 428 | { NET_AX25_DEFAULT_MODE, "ax25_default_mode" }, |
| 429 | { NET_AX25_BACKOFF_TYPE, "backoff_type" }, | 429 | { NET_AX25_BACKOFF_TYPE, "backoff_type" }, |
| @@ -441,12 +441,12 @@ static struct trans_ctl_table trans_net_ax25_param_table[] = { | |||
| 441 | {} | 441 | {} |
| 442 | }; | 442 | }; |
| 443 | 443 | ||
| 444 | static struct trans_ctl_table trans_net_ax25_table[] = { | 444 | static const struct trans_ctl_table trans_net_ax25_table[] = { |
| 445 | { 0, NULL, trans_net_ax25_param_table }, | 445 | { 0, NULL, trans_net_ax25_param_table }, |
| 446 | {} | 446 | {} |
| 447 | }; | 447 | }; |
| 448 | 448 | ||
| 449 | static struct trans_ctl_table trans_net_bridge_table[] = { | 449 | static const struct trans_ctl_table trans_net_bridge_table[] = { |
| 450 | { NET_BRIDGE_NF_CALL_ARPTABLES, "bridge-nf-call-arptables" }, | 450 | { NET_BRIDGE_NF_CALL_ARPTABLES, "bridge-nf-call-arptables" }, |
| 451 | { NET_BRIDGE_NF_CALL_IPTABLES, "bridge-nf-call-iptables" }, | 451 | { NET_BRIDGE_NF_CALL_IPTABLES, "bridge-nf-call-iptables" }, |
| 452 | { NET_BRIDGE_NF_CALL_IP6TABLES, "bridge-nf-call-ip6tables" }, | 452 | { NET_BRIDGE_NF_CALL_IP6TABLES, "bridge-nf-call-ip6tables" }, |
| @@ -455,7 +455,7 @@ static struct trans_ctl_table trans_net_bridge_table[] = { | |||
| 455 | {} | 455 | {} |
| 456 | }; | 456 | }; |
| 457 | 457 | ||
| 458 | static struct trans_ctl_table trans_net_rose_table[] = { | 458 | static const struct trans_ctl_table trans_net_rose_table[] = { |
| 459 | { NET_ROSE_RESTART_REQUEST_TIMEOUT, "restart_request_timeout" }, | 459 | { NET_ROSE_RESTART_REQUEST_TIMEOUT, "restart_request_timeout" }, |
| 460 | { NET_ROSE_CALL_REQUEST_TIMEOUT, "call_request_timeout" }, | 460 | { NET_ROSE_CALL_REQUEST_TIMEOUT, "call_request_timeout" }, |
| 461 | { NET_ROSE_RESET_REQUEST_TIMEOUT, "reset_request_timeout" }, | 461 | { NET_ROSE_RESET_REQUEST_TIMEOUT, "reset_request_timeout" }, |
| @@ -469,7 +469,7 @@ static struct trans_ctl_table trans_net_rose_table[] = { | |||
| 469 | {} | 469 | {} |
| 470 | }; | 470 | }; |
| 471 | 471 | ||
| 472 | static struct trans_ctl_table trans_net_ipv6_conf_var_table[] = { | 472 | static const struct trans_ctl_table trans_net_ipv6_conf_var_table[] = { |
| 473 | { NET_IPV6_FORWARDING, "forwarding" }, | 473 | { NET_IPV6_FORWARDING, "forwarding" }, |
| 474 | { NET_IPV6_HOP_LIMIT, "hop_limit" }, | 474 | { NET_IPV6_HOP_LIMIT, "hop_limit" }, |
| 475 | { NET_IPV6_MTU, "mtu" }, | 475 | { NET_IPV6_MTU, "mtu" }, |
| @@ -497,14 +497,14 @@ static struct trans_ctl_table trans_net_ipv6_conf_var_table[] = { | |||
| 497 | {} | 497 | {} |
| 498 | }; | 498 | }; |
| 499 | 499 | ||
| 500 | static struct trans_ctl_table trans_net_ipv6_conf_table[] = { | 500 | static const struct trans_ctl_table trans_net_ipv6_conf_table[] = { |
| 501 | { NET_PROTO_CONF_ALL, "all", trans_net_ipv6_conf_var_table }, | 501 | { NET_PROTO_CONF_ALL, "all", trans_net_ipv6_conf_var_table }, |
| 502 | { NET_PROTO_CONF_DEFAULT, "default", trans_net_ipv6_conf_var_table }, | 502 | { NET_PROTO_CONF_DEFAULT, "default", trans_net_ipv6_conf_var_table }, |
| 503 | { 0, NULL, trans_net_ipv6_conf_var_table }, | 503 | { 0, NULL, trans_net_ipv6_conf_var_table }, |
| 504 | {} | 504 | {} |
| 505 | }; | 505 | }; |
| 506 | 506 | ||
| 507 | static struct trans_ctl_table trans_net_ipv6_route_table[] = { | 507 | static const struct trans_ctl_table trans_net_ipv6_route_table[] = { |
| 508 | { NET_IPV6_ROUTE_FLUSH, "flush" }, | 508 | { NET_IPV6_ROUTE_FLUSH, "flush" }, |
| 509 | { NET_IPV6_ROUTE_GC_THRESH, "gc_thresh" }, | 509 | { NET_IPV6_ROUTE_GC_THRESH, "gc_thresh" }, |
| 510 | { NET_IPV6_ROUTE_MAX_SIZE, "max_size" }, | 510 | { NET_IPV6_ROUTE_MAX_SIZE, "max_size" }, |
| @@ -518,12 +518,12 @@ static struct trans_ctl_table trans_net_ipv6_route_table[] = { | |||
| 518 | {} | 518 | {} |
| 519 | }; | 519 | }; |
| 520 | 520 | ||
| 521 | static struct trans_ctl_table trans_net_ipv6_icmp_table[] = { | 521 | static const struct trans_ctl_table trans_net_ipv6_icmp_table[] = { |
| 522 | { NET_IPV6_ICMP_RATELIMIT, "ratelimit" }, | 522 | { NET_IPV6_ICMP_RATELIMIT, "ratelimit" }, |
| 523 | {} | 523 | {} |
| 524 | }; | 524 | }; |
| 525 | 525 | ||
| 526 | static struct trans_ctl_table trans_net_ipv6_table[] = { | 526 | static const struct trans_ctl_table trans_net_ipv6_table[] = { |
| 527 | { NET_IPV6_CONF, "conf", trans_net_ipv6_conf_table }, | 527 | { NET_IPV6_CONF, "conf", trans_net_ipv6_conf_table }, |
| 528 | { NET_IPV6_NEIGH, "neigh", trans_net_neigh_table }, | 528 | { NET_IPV6_NEIGH, "neigh", trans_net_neigh_table }, |
| 529 | { NET_IPV6_ROUTE, "route", trans_net_ipv6_route_table }, | 529 | { NET_IPV6_ROUTE, "route", trans_net_ipv6_route_table }, |
| @@ -538,7 +538,7 @@ static struct trans_ctl_table trans_net_ipv6_table[] = { | |||
| 538 | {} | 538 | {} |
| 539 | }; | 539 | }; |
| 540 | 540 | ||
| 541 | static struct trans_ctl_table trans_net_x25_table[] = { | 541 | static const struct trans_ctl_table trans_net_x25_table[] = { |
| 542 | { NET_X25_RESTART_REQUEST_TIMEOUT, "restart_request_timeout" }, | 542 | { NET_X25_RESTART_REQUEST_TIMEOUT, "restart_request_timeout" }, |
| 543 | { NET_X25_CALL_REQUEST_TIMEOUT, "call_request_timeout" }, | 543 | { NET_X25_CALL_REQUEST_TIMEOUT, "call_request_timeout" }, |
| 544 | { NET_X25_RESET_REQUEST_TIMEOUT, "reset_request_timeout" }, | 544 | { NET_X25_RESET_REQUEST_TIMEOUT, "reset_request_timeout" }, |
| @@ -548,13 +548,13 @@ static struct trans_ctl_table trans_net_x25_table[] = { | |||
| 548 | {} | 548 | {} |
| 549 | }; | 549 | }; |
| 550 | 550 | ||
| 551 | static struct trans_ctl_table trans_net_tr_table[] = { | 551 | static const struct trans_ctl_table trans_net_tr_table[] = { |
| 552 | { NET_TR_RIF_TIMEOUT, "rif_timeout" }, | 552 | { NET_TR_RIF_TIMEOUT, "rif_timeout" }, |
| 553 | {} | 553 | {} |
| 554 | }; | 554 | }; |
| 555 | 555 | ||
| 556 | 556 | ||
| 557 | static struct trans_ctl_table trans_net_decnet_conf_vars[] = { | 557 | static const struct trans_ctl_table trans_net_decnet_conf_vars[] = { |
| 558 | { NET_DECNET_CONF_DEV_FORWARDING, "forwarding" }, | 558 | { NET_DECNET_CONF_DEV_FORWARDING, "forwarding" }, |
| 559 | { NET_DECNET_CONF_DEV_PRIORITY, "priority" }, | 559 | { NET_DECNET_CONF_DEV_PRIORITY, "priority" }, |
| 560 | { NET_DECNET_CONF_DEV_T2, "t2" }, | 560 | { NET_DECNET_CONF_DEV_T2, "t2" }, |
| @@ -562,12 +562,12 @@ static struct trans_ctl_table trans_net_decnet_conf_vars[] = { | |||
| 562 | {} | 562 | {} |
| 563 | }; | 563 | }; |
| 564 | 564 | ||
| 565 | static struct trans_ctl_table trans_net_decnet_conf[] = { | 565 | static const struct trans_ctl_table trans_net_decnet_conf[] = { |
| 566 | { 0, NULL, trans_net_decnet_conf_vars }, | 566 | { 0, NULL, trans_net_decnet_conf_vars }, |
| 567 | {} | 567 | {} |
| 568 | }; | 568 | }; |
| 569 | 569 | ||
| 570 | static struct trans_ctl_table trans_net_decnet_table[] = { | 570 | static const struct trans_ctl_table trans_net_decnet_table[] = { |
| 571 | { NET_DECNET_CONF, "conf", trans_net_decnet_conf }, | 571 | { NET_DECNET_CONF, "conf", trans_net_decnet_conf }, |
| 572 | { NET_DECNET_NODE_ADDRESS, "node_address" }, | 572 | { NET_DECNET_NODE_ADDRESS, "node_address" }, |
| 573 | { NET_DECNET_NODE_NAME, "node_name" }, | 573 | { NET_DECNET_NODE_NAME, "node_name" }, |
| @@ -585,7 +585,7 @@ static struct trans_ctl_table trans_net_decnet_table[] = { | |||
| 585 | {} | 585 | {} |
| 586 | }; | 586 | }; |
| 587 | 587 | ||
| 588 | static struct trans_ctl_table trans_net_sctp_table[] = { | 588 | static const struct trans_ctl_table trans_net_sctp_table[] = { |
| 589 | { NET_SCTP_RTO_INITIAL, "rto_initial" }, | 589 | { NET_SCTP_RTO_INITIAL, "rto_initial" }, |
| 590 | { NET_SCTP_RTO_MIN, "rto_min" }, | 590 | { NET_SCTP_RTO_MIN, "rto_min" }, |
| 591 | { NET_SCTP_RTO_MAX, "rto_max" }, | 591 | { NET_SCTP_RTO_MAX, "rto_max" }, |
| @@ -606,7 +606,7 @@ static struct trans_ctl_table trans_net_sctp_table[] = { | |||
| 606 | {} | 606 | {} |
| 607 | }; | 607 | }; |
| 608 | 608 | ||
| 609 | static struct trans_ctl_table trans_net_llc_llc2_timeout_table[] = { | 609 | static const struct trans_ctl_table trans_net_llc_llc2_timeout_table[] = { |
| 610 | { NET_LLC2_ACK_TIMEOUT, "ack" }, | 610 | { NET_LLC2_ACK_TIMEOUT, "ack" }, |
| 611 | { NET_LLC2_P_TIMEOUT, "p" }, | 611 | { NET_LLC2_P_TIMEOUT, "p" }, |
| 612 | { NET_LLC2_REJ_TIMEOUT, "rej" }, | 612 | { NET_LLC2_REJ_TIMEOUT, "rej" }, |
| @@ -614,23 +614,23 @@ static struct trans_ctl_table trans_net_llc_llc2_timeout_table[] = { | |||
| 614 | {} | 614 | {} |
| 615 | }; | 615 | }; |
| 616 | 616 | ||
| 617 | static struct trans_ctl_table trans_net_llc_station_table[] = { | 617 | static const struct trans_ctl_table trans_net_llc_station_table[] = { |
| 618 | { NET_LLC_STATION_ACK_TIMEOUT, "ack_timeout" }, | 618 | { NET_LLC_STATION_ACK_TIMEOUT, "ack_timeout" }, |
| 619 | {} | 619 | {} |
| 620 | }; | 620 | }; |
| 621 | 621 | ||
| 622 | static struct trans_ctl_table trans_net_llc_llc2_table[] = { | 622 | static const struct trans_ctl_table trans_net_llc_llc2_table[] = { |
| 623 | { NET_LLC2, "timeout", trans_net_llc_llc2_timeout_table }, | 623 | { NET_LLC2, "timeout", trans_net_llc_llc2_timeout_table }, |
| 624 | {} | 624 | {} |
| 625 | }; | 625 | }; |
| 626 | 626 | ||
| 627 | static struct trans_ctl_table trans_net_llc_table[] = { | 627 | static const struct trans_ctl_table trans_net_llc_table[] = { |
| 628 | { NET_LLC2, "llc2", trans_net_llc_llc2_table }, | 628 | { NET_LLC2, "llc2", trans_net_llc_llc2_table }, |
| 629 | { NET_LLC_STATION, "station", trans_net_llc_station_table }, | 629 | { NET_LLC_STATION, "station", trans_net_llc_station_table }, |
| 630 | {} | 630 | {} |
| 631 | }; | 631 | }; |
| 632 | 632 | ||
| 633 | static struct trans_ctl_table trans_net_netfilter_table[] = { | 633 | static const struct trans_ctl_table trans_net_netfilter_table[] = { |
| 634 | { NET_NF_CONNTRACK_MAX, "nf_conntrack_max" }, | 634 | { NET_NF_CONNTRACK_MAX, "nf_conntrack_max" }, |
| 635 | { NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT, "nf_conntrack_tcp_timeout_syn_sent" }, | 635 | { NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT, "nf_conntrack_tcp_timeout_syn_sent" }, |
| 636 | { NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV, "nf_conntrack_tcp_timeout_syn_recv" }, | 636 | { NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV, "nf_conntrack_tcp_timeout_syn_recv" }, |
| @@ -667,12 +667,12 @@ static struct trans_ctl_table trans_net_netfilter_table[] = { | |||
| 667 | {} | 667 | {} |
| 668 | }; | 668 | }; |
| 669 | 669 | ||
| 670 | static struct trans_ctl_table trans_net_dccp_table[] = { | 670 | static const struct trans_ctl_table trans_net_dccp_table[] = { |
| 671 | { NET_DCCP_DEFAULT, "default" }, | 671 | { NET_DCCP_DEFAULT, "default" }, |
| 672 | {} | 672 | {} |
| 673 | }; | 673 | }; |
| 674 | 674 | ||
| 675 | static struct trans_ctl_table trans_net_irda_table[] = { | 675 | static const struct trans_ctl_table trans_net_irda_table[] = { |
| 676 | { NET_IRDA_DISCOVERY, "discovery" }, | 676 | { NET_IRDA_DISCOVERY, "discovery" }, |
| 677 | { NET_IRDA_DEVNAME, "devname" }, | 677 | { NET_IRDA_DEVNAME, "devname" }, |
| 678 | { NET_IRDA_DEBUG, "debug" }, | 678 | { NET_IRDA_DEBUG, "debug" }, |
| @@ -690,7 +690,7 @@ static struct trans_ctl_table trans_net_irda_table[] = { | |||
| 690 | {} | 690 | {} |
| 691 | }; | 691 | }; |
| 692 | 692 | ||
| 693 | static struct trans_ctl_table trans_net_table[] = { | 693 | static const struct trans_ctl_table trans_net_table[] = { |
| 694 | { NET_CORE, "core", trans_net_core_table }, | 694 | { NET_CORE, "core", trans_net_core_table }, |
| 695 | /* NET_ETHER not used */ | 695 | /* NET_ETHER not used */ |
| 696 | /* NET_802 not used */ | 696 | /* NET_802 not used */ |
| @@ -716,7 +716,7 @@ static struct trans_ctl_table trans_net_table[] = { | |||
| 716 | {} | 716 | {} |
| 717 | }; | 717 | }; |
| 718 | 718 | ||
| 719 | static struct trans_ctl_table trans_fs_quota_table[] = { | 719 | static const struct trans_ctl_table trans_fs_quota_table[] = { |
| 720 | { FS_DQ_LOOKUPS, "lookups" }, | 720 | { FS_DQ_LOOKUPS, "lookups" }, |
| 721 | { FS_DQ_DROPS, "drops" }, | 721 | { FS_DQ_DROPS, "drops" }, |
| 722 | { FS_DQ_READS, "reads" }, | 722 | { FS_DQ_READS, "reads" }, |
| @@ -729,7 +729,7 @@ static struct trans_ctl_table trans_fs_quota_table[] = { | |||
| 729 | {} | 729 | {} |
| 730 | }; | 730 | }; |
| 731 | 731 | ||
| 732 | static struct trans_ctl_table trans_fs_xfs_table[] = { | 732 | static const struct trans_ctl_table trans_fs_xfs_table[] = { |
| 733 | { XFS_RESTRICT_CHOWN, "restrict_chown" }, | 733 | { XFS_RESTRICT_CHOWN, "restrict_chown" }, |
| 734 | { XFS_SGID_INHERIT, "irix_sgid_inherit" }, | 734 | { XFS_SGID_INHERIT, "irix_sgid_inherit" }, |
| 735 | { XFS_SYMLINK_MODE, "irix_symlink_mode" }, | 735 | { XFS_SYMLINK_MODE, "irix_symlink_mode" }, |
| @@ -750,24 +750,24 @@ static struct trans_ctl_table trans_fs_xfs_table[] = { | |||
| 750 | {} | 750 | {} |
| 751 | }; | 751 | }; |
| 752 | 752 | ||
| 753 | static struct trans_ctl_table trans_fs_ocfs2_nm_table[] = { | 753 | static const struct trans_ctl_table trans_fs_ocfs2_nm_table[] = { |
| 754 | { 1, "hb_ctl_path" }, | 754 | { 1, "hb_ctl_path" }, |
| 755 | {} | 755 | {} |
| 756 | }; | 756 | }; |
| 757 | 757 | ||
| 758 | static struct trans_ctl_table trans_fs_ocfs2_table[] = { | 758 | static const struct trans_ctl_table trans_fs_ocfs2_table[] = { |
| 759 | { 1, "nm", trans_fs_ocfs2_nm_table }, | 759 | { 1, "nm", trans_fs_ocfs2_nm_table }, |
| 760 | {} | 760 | {} |
| 761 | }; | 761 | }; |
| 762 | 762 | ||
| 763 | static struct trans_ctl_table trans_inotify_table[] = { | 763 | static const struct trans_ctl_table trans_inotify_table[] = { |
| 764 | { INOTIFY_MAX_USER_INSTANCES, "max_user_instances" }, | 764 | { INOTIFY_MAX_USER_INSTANCES, "max_user_instances" }, |
| 765 | { INOTIFY_MAX_USER_WATCHES, "max_user_watches" }, | 765 | { INOTIFY_MAX_USER_WATCHES, "max_user_watches" }, |
| 766 | { INOTIFY_MAX_QUEUED_EVENTS, "max_queued_events" }, | 766 | { INOTIFY_MAX_QUEUED_EVENTS, "max_queued_events" }, |
| 767 | {} | 767 | {} |
| 768 | }; | 768 | }; |
| 769 | 769 | ||
| 770 | static struct trans_ctl_table trans_fs_table[] = { | 770 | static const struct trans_ctl_table trans_fs_table[] = { |
| 771 | { FS_NRINODE, "inode-nr" }, | 771 | { FS_NRINODE, "inode-nr" }, |
| 772 | { FS_STATINODE, "inode-state" }, | 772 | { FS_STATINODE, "inode-state" }, |
| 773 | /* FS_MAXINODE unused */ | 773 | /* FS_MAXINODE unused */ |
| @@ -793,11 +793,11 @@ static struct trans_ctl_table trans_fs_table[] = { | |||
| 793 | {} | 793 | {} |
| 794 | }; | 794 | }; |
| 795 | 795 | ||
| 796 | static struct trans_ctl_table trans_debug_table[] = { | 796 | static const struct trans_ctl_table trans_debug_table[] = { |
| 797 | {} | 797 | {} |
| 798 | }; | 798 | }; |
| 799 | 799 | ||
| 800 | static struct trans_ctl_table trans_cdrom_table[] = { | 800 | static const struct trans_ctl_table trans_cdrom_table[] = { |
| 801 | { DEV_CDROM_INFO, "info" }, | 801 | { DEV_CDROM_INFO, "info" }, |
| 802 | { DEV_CDROM_AUTOCLOSE, "autoclose" }, | 802 | { DEV_CDROM_AUTOCLOSE, "autoclose" }, |
| 803 | { DEV_CDROM_AUTOEJECT, "autoeject" }, | 803 | { DEV_CDROM_AUTOEJECT, "autoeject" }, |
| @@ -807,12 +807,12 @@ static struct trans_ctl_table trans_cdrom_table[] = { | |||
| 807 | {} | 807 | {} |
| 808 | }; | 808 | }; |
| 809 | 809 | ||
| 810 | static struct trans_ctl_table trans_ipmi_table[] = { | 810 | static const struct trans_ctl_table trans_ipmi_table[] = { |
| 811 | { DEV_IPMI_POWEROFF_POWERCYCLE, "poweroff_powercycle" }, | 811 | { DEV_IPMI_POWEROFF_POWERCYCLE, "poweroff_powercycle" }, |
| 812 | {} | 812 | {} |
| 813 | }; | 813 | }; |
| 814 | 814 | ||
| 815 | static struct trans_ctl_table trans_mac_hid_files[] = { | 815 | static const struct trans_ctl_table trans_mac_hid_files[] = { |
| 816 | /* DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES unused */ | 816 | /* DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES unused */ |
| 817 | /* DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES unused */ | 817 | /* DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES unused */ |
| 818 | { DEV_MAC_HID_MOUSE_BUTTON_EMULATION, "mouse_button_emulation" }, | 818 | { DEV_MAC_HID_MOUSE_BUTTON_EMULATION, "mouse_button_emulation" }, |
| @@ -822,35 +822,35 @@ static struct trans_ctl_table trans_mac_hid_files[] = { | |||
| 822 | {} | 822 | {} |
| 823 | }; | 823 | }; |
| 824 | 824 | ||
| 825 | static struct trans_ctl_table trans_raid_table[] = { | 825 | static const struct trans_ctl_table trans_raid_table[] = { |
| 826 | { DEV_RAID_SPEED_LIMIT_MIN, "speed_limit_min" }, | 826 | { DEV_RAID_SPEED_LIMIT_MIN, "speed_limit_min" }, |
| 827 | { DEV_RAID_SPEED_LIMIT_MAX, "speed_limit_max" }, | 827 | { DEV_RAID_SPEED_LIMIT_MAX, "speed_limit_max" }, |
| 828 | {} | 828 | {} |
| 829 | }; | 829 | }; |
| 830 | 830 | ||
| 831 | static struct trans_ctl_table trans_scsi_table[] = { | 831 | static const struct trans_ctl_table trans_scsi_table[] = { |
| 832 | { DEV_SCSI_LOGGING_LEVEL, "logging_level" }, | 832 | { DEV_SCSI_LOGGING_LEVEL, "logging_level" }, |
| 833 | {} | 833 | {} |
| 834 | }; | 834 | }; |
| 835 | 835 | ||
| 836 | static struct trans_ctl_table trans_parport_default_table[] = { | 836 | static const struct trans_ctl_table trans_parport_default_table[] = { |
| 837 | { DEV_PARPORT_DEFAULT_TIMESLICE, "timeslice" }, | 837 | { DEV_PARPORT_DEFAULT_TIMESLICE, "timeslice" }, |
| 838 | { DEV_PARPORT_DEFAULT_SPINTIME, "spintime" }, | 838 | { DEV_PARPORT_DEFAULT_SPINTIME, "spintime" }, |
| 839 | {} | 839 | {} |
| 840 | }; | 840 | }; |
| 841 | 841 | ||
| 842 | static struct trans_ctl_table trans_parport_device_table[] = { | 842 | static const struct trans_ctl_table trans_parport_device_table[] = { |
| 843 | { DEV_PARPORT_DEVICE_TIMESLICE, "timeslice" }, | 843 | { DEV_PARPORT_DEVICE_TIMESLICE, "timeslice" }, |
| 844 | {} | 844 | {} |
| 845 | }; | 845 | }; |
| 846 | 846 | ||
| 847 | static struct trans_ctl_table trans_parport_devices_table[] = { | 847 | static const struct trans_ctl_table trans_parport_devices_table[] = { |
| 848 | { DEV_PARPORT_DEVICES_ACTIVE, "active" }, | 848 | { DEV_PARPORT_DEVICES_ACTIVE, "active" }, |
| 849 | { 0, NULL, trans_parport_device_table }, | 849 | { 0, NULL, trans_parport_device_table }, |
| 850 | {} | 850 | {} |
| 851 | }; | 851 | }; |
| 852 | 852 | ||
| 853 | static struct trans_ctl_table trans_parport_parport_table[] = { | 853 | static const struct trans_ctl_table trans_parport_parport_table[] = { |
| 854 | { DEV_PARPORT_SPINTIME, "spintime" }, | 854 | { DEV_PARPORT_SPINTIME, "spintime" }, |
| 855 | { DEV_PARPORT_BASE_ADDR, "base-addr" }, | 855 | { DEV_PARPORT_BASE_ADDR, "base-addr" }, |
| 856 | { DEV_PARPORT_IRQ, "irq" }, | 856 | { DEV_PARPORT_IRQ, "irq" }, |
| @@ -864,13 +864,13 @@ static struct trans_ctl_table trans_parport_parport_table[] = { | |||
| 864 | { DEV_PARPORT_AUTOPROBE + 4, "autoprobe3" }, | 864 | { DEV_PARPORT_AUTOPROBE + 4, "autoprobe3" }, |
| 865 | {} | 865 | {} |
| 866 | }; | 866 | }; |
| 867 | static struct trans_ctl_table trans_parport_table[] = { | 867 | static const struct trans_ctl_table trans_parport_table[] = { |
| 868 | { DEV_PARPORT_DEFAULT, "default", trans_parport_default_table }, | 868 | { DEV_PARPORT_DEFAULT, "default", trans_parport_default_table }, |
| 869 | { 0, NULL, trans_parport_parport_table }, | 869 | { 0, NULL, trans_parport_parport_table }, |
| 870 | {} | 870 | {} |
| 871 | }; | 871 | }; |
| 872 | 872 | ||
| 873 | static struct trans_ctl_table trans_dev_table[] = { | 873 | static const struct trans_ctl_table trans_dev_table[] = { |
| 874 | { DEV_CDROM, "cdrom", trans_cdrom_table }, | 874 | { DEV_CDROM, "cdrom", trans_cdrom_table }, |
| 875 | /* DEV_HWMON unused */ | 875 | /* DEV_HWMON unused */ |
| 876 | { DEV_PARPORT, "parport", trans_parport_table }, | 876 | { DEV_PARPORT, "parport", trans_parport_table }, |
| @@ -881,19 +881,19 @@ static struct trans_ctl_table trans_dev_table[] = { | |||
| 881 | {} | 881 | {} |
| 882 | }; | 882 | }; |
| 883 | 883 | ||
| 884 | static struct trans_ctl_table trans_bus_isa_table[] = { | 884 | static const struct trans_ctl_table trans_bus_isa_table[] = { |
| 885 | { BUS_ISA_MEM_BASE, "membase" }, | 885 | { BUS_ISA_MEM_BASE, "membase" }, |
| 886 | { BUS_ISA_PORT_BASE, "portbase" }, | 886 | { BUS_ISA_PORT_BASE, "portbase" }, |
| 887 | { BUS_ISA_PORT_SHIFT, "portshift" }, | 887 | { BUS_ISA_PORT_SHIFT, "portshift" }, |
| 888 | {} | 888 | {} |
| 889 | }; | 889 | }; |
| 890 | 890 | ||
| 891 | static struct trans_ctl_table trans_bus_table[] = { | 891 | static const struct trans_ctl_table trans_bus_table[] = { |
| 892 | { CTL_BUS_ISA, "isa", trans_bus_isa_table }, | 892 | { CTL_BUS_ISA, "isa", trans_bus_isa_table }, |
| 893 | {} | 893 | {} |
| 894 | }; | 894 | }; |
| 895 | 895 | ||
| 896 | static struct trans_ctl_table trans_arlan_conf_table0[] = { | 896 | static const struct trans_ctl_table trans_arlan_conf_table0[] = { |
| 897 | { 1, "spreadingCode" }, | 897 | { 1, "spreadingCode" }, |
| 898 | { 2, "channelNumber" }, | 898 | { 2, "channelNumber" }, |
| 899 | { 3, "scramblingDisable" }, | 899 | { 3, "scramblingDisable" }, |
| @@ -964,7 +964,7 @@ static struct trans_ctl_table trans_arlan_conf_table0[] = { | |||
| 964 | {} | 964 | {} |
| 965 | }; | 965 | }; |
| 966 | 966 | ||
| 967 | static struct trans_ctl_table trans_arlan_conf_table1[] = { | 967 | static const struct trans_ctl_table trans_arlan_conf_table1[] = { |
| 968 | { 1, "spreadingCode" }, | 968 | { 1, "spreadingCode" }, |
| 969 | { 2, "channelNumber" }, | 969 | { 2, "channelNumber" }, |
| 970 | { 3, "scramblingDisable" }, | 970 | { 3, "scramblingDisable" }, |
| @@ -1035,7 +1035,7 @@ static struct trans_ctl_table trans_arlan_conf_table1[] = { | |||
| 1035 | {} | 1035 | {} |
| 1036 | }; | 1036 | }; |
| 1037 | 1037 | ||
| 1038 | static struct trans_ctl_table trans_arlan_conf_table2[] = { | 1038 | static const struct trans_ctl_table trans_arlan_conf_table2[] = { |
| 1039 | { 1, "spreadingCode" }, | 1039 | { 1, "spreadingCode" }, |
| 1040 | { 2, "channelNumber" }, | 1040 | { 2, "channelNumber" }, |
| 1041 | { 3, "scramblingDisable" }, | 1041 | { 3, "scramblingDisable" }, |
| @@ -1106,7 +1106,7 @@ static struct trans_ctl_table trans_arlan_conf_table2[] = { | |||
| 1106 | {} | 1106 | {} |
| 1107 | }; | 1107 | }; |
| 1108 | 1108 | ||
| 1109 | static struct trans_ctl_table trans_arlan_conf_table3[] = { | 1109 | static const struct trans_ctl_table trans_arlan_conf_table3[] = { |
| 1110 | { 1, "spreadingCode" }, | 1110 | { 1, "spreadingCode" }, |
| 1111 | { 2, "channelNumber" }, | 1111 | { 2, "channelNumber" }, |
| 1112 | { 3, "scramblingDisable" }, | 1112 | { 3, "scramblingDisable" }, |
| @@ -1177,7 +1177,7 @@ static struct trans_ctl_table trans_arlan_conf_table3[] = { | |||
| 1177 | {} | 1177 | {} |
| 1178 | }; | 1178 | }; |
| 1179 | 1179 | ||
| 1180 | static struct trans_ctl_table trans_arlan_table[] = { | 1180 | static const struct trans_ctl_table trans_arlan_table[] = { |
| 1181 | { 1, "arlan0", trans_arlan_conf_table0 }, | 1181 | { 1, "arlan0", trans_arlan_conf_table0 }, |
| 1182 | { 2, "arlan1", trans_arlan_conf_table1 }, | 1182 | { 2, "arlan1", trans_arlan_conf_table1 }, |
| 1183 | { 3, "arlan2", trans_arlan_conf_table2 }, | 1183 | { 3, "arlan2", trans_arlan_conf_table2 }, |
| @@ -1185,13 +1185,13 @@ static struct trans_ctl_table trans_arlan_table[] = { | |||
| 1185 | {} | 1185 | {} |
| 1186 | }; | 1186 | }; |
| 1187 | 1187 | ||
| 1188 | static struct trans_ctl_table trans_s390dbf_table[] = { | 1188 | static const struct trans_ctl_table trans_s390dbf_table[] = { |
| 1189 | { 5678 /* CTL_S390DBF_STOPPABLE */, "debug_stoppable" }, | 1189 | { 5678 /* CTL_S390DBF_STOPPABLE */, "debug_stoppable" }, |
| 1190 | { 5679 /* CTL_S390DBF_ACTIVE */, "debug_active" }, | 1190 | { 5679 /* CTL_S390DBF_ACTIVE */, "debug_active" }, |
| 1191 | {} | 1191 | {} |
| 1192 | }; | 1192 | }; |
| 1193 | 1193 | ||
| 1194 | static struct trans_ctl_table trans_sunrpc_table[] = { | 1194 | static const struct trans_ctl_table trans_sunrpc_table[] = { |
| 1195 | { CTL_RPCDEBUG, "rpc_debug" }, | 1195 | { CTL_RPCDEBUG, "rpc_debug" }, |
| 1196 | { CTL_NFSDEBUG, "nfs_debug" }, | 1196 | { CTL_NFSDEBUG, "nfs_debug" }, |
| 1197 | { CTL_NFSDDEBUG, "nfsd_debug" }, | 1197 | { CTL_NFSDDEBUG, "nfsd_debug" }, |
| @@ -1203,7 +1203,7 @@ static struct trans_ctl_table trans_sunrpc_table[] = { | |||
| 1203 | {} | 1203 | {} |
| 1204 | }; | 1204 | }; |
| 1205 | 1205 | ||
| 1206 | static struct trans_ctl_table trans_pm_table[] = { | 1206 | static const struct trans_ctl_table trans_pm_table[] = { |
| 1207 | { 1 /* CTL_PM_SUSPEND */, "suspend" }, | 1207 | { 1 /* CTL_PM_SUSPEND */, "suspend" }, |
| 1208 | { 2 /* CTL_PM_CMODE */, "cmode" }, | 1208 | { 2 /* CTL_PM_CMODE */, "cmode" }, |
| 1209 | { 3 /* CTL_PM_P0 */, "p0" }, | 1209 | { 3 /* CTL_PM_P0 */, "p0" }, |
| @@ -1211,13 +1211,13 @@ static struct trans_ctl_table trans_pm_table[] = { | |||
| 1211 | {} | 1211 | {} |
| 1212 | }; | 1212 | }; |
| 1213 | 1213 | ||
| 1214 | static struct trans_ctl_table trans_frv_table[] = { | 1214 | static const struct trans_ctl_table trans_frv_table[] = { |
| 1215 | { 1, "cache-mode" }, | 1215 | { 1, "cache-mode" }, |
| 1216 | { 2, "pin-cxnr" }, | 1216 | { 2, "pin-cxnr" }, |
| 1217 | {} | 1217 | {} |
| 1218 | }; | 1218 | }; |
| 1219 | 1219 | ||
| 1220 | static struct trans_ctl_table trans_root_table[] = { | 1220 | static const struct trans_ctl_table trans_root_table[] = { |
| 1221 | { CTL_KERN, "kernel", trans_kern_table }, | 1221 | { CTL_KERN, "kernel", trans_kern_table }, |
| 1222 | { CTL_VM, "vm", trans_vm_table }, | 1222 | { CTL_VM, "vm", trans_vm_table }, |
| 1223 | { CTL_NET, "net", trans_net_table }, | 1223 | { CTL_NET, "net", trans_net_table }, |
| @@ -1261,15 +1261,14 @@ static struct ctl_table *sysctl_parent(struct ctl_table *table, int n) | |||
| 1261 | return table; | 1261 | return table; |
| 1262 | } | 1262 | } |
| 1263 | 1263 | ||
| 1264 | static struct trans_ctl_table *sysctl_binary_lookup(struct ctl_table *table) | 1264 | static const struct trans_ctl_table *sysctl_binary_lookup(struct ctl_table *table) |
| 1265 | { | 1265 | { |
| 1266 | struct ctl_table *test; | 1266 | struct ctl_table *test; |
| 1267 | struct trans_ctl_table *ref; | 1267 | const struct trans_ctl_table *ref; |
| 1268 | int depth, cur_depth; | 1268 | int cur_depth; |
| 1269 | 1269 | ||
| 1270 | depth = sysctl_depth(table); | 1270 | cur_depth = sysctl_depth(table); |
| 1271 | 1271 | ||
| 1272 | cur_depth = depth; | ||
| 1273 | ref = trans_root_table; | 1272 | ref = trans_root_table; |
| 1274 | repeat: | 1273 | repeat: |
| 1275 | test = sysctl_parent(table, cur_depth); | 1274 | test = sysctl_parent(table, cur_depth); |
| @@ -1437,7 +1436,7 @@ static void sysctl_check_leaf(struct nsproxy *namespaces, | |||
| 1437 | 1436 | ||
| 1438 | static void sysctl_check_bin_path(struct ctl_table *table, const char **fail) | 1437 | static void sysctl_check_bin_path(struct ctl_table *table, const char **fail) |
| 1439 | { | 1438 | { |
| 1440 | struct trans_ctl_table *ref; | 1439 | const struct trans_ctl_table *ref; |
| 1441 | 1440 | ||
| 1442 | ref = sysctl_binary_lookup(table); | 1441 | ref = sysctl_binary_lookup(table); |
| 1443 | if (table->ctl_name && !ref) | 1442 | if (table->ctl_name && !ref) |
