Commit 6c9d8480 authored by Art Haas's avatar Art Haas Committed by Linus Torvalds

[PATCH] C99 initializer for net/netrom/sysctl_net_netrom.c

parent 98a98115
...@@ -34,50 +34,150 @@ static int min_fails[] = {1}, max_fails[] = {10}; ...@@ -34,50 +34,150 @@ static int min_fails[] = {1}, max_fails[] = {10};
static struct ctl_table_header *nr_table_header; static struct ctl_table_header *nr_table_header;
static ctl_table nr_table[] = { static ctl_table nr_table[] = {
{NET_NETROM_DEFAULT_PATH_QUALITY, "default_path_quality", {
&sysctl_netrom_default_path_quality, sizeof(int), 0644, NULL, .ctl_name = NET_NETROM_DEFAULT_PATH_QUALITY,
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_quality, &max_quality}, .procname = "default_path_quality",
{NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER, "obsolescence_count_initialiser", .data = &sysctl_netrom_default_path_quality,
&sysctl_netrom_obsolescence_count_initialiser, sizeof(int), 0644, NULL, .maxlen = sizeof(int),
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_obs, &max_obs}, .mode = 0644,
{NET_NETROM_NETWORK_TTL_INITIALISER, "network_ttl_initialiser", .proc_handler = &proc_dointvec_minmax,
&sysctl_netrom_network_ttl_initialiser, sizeof(int), 0644, NULL, .strategy = &sysctl_intvec,
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_ttl, &max_ttl}, .extra1 = &min_quality,
{NET_NETROM_TRANSPORT_TIMEOUT, "transport_timeout", .extra2 = &max_quality
&sysctl_netrom_transport_timeout, sizeof(int), 0644, NULL, },
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_t1, &max_t1}, {
{NET_NETROM_TRANSPORT_MAXIMUM_TRIES, "transport_maximum_tries", .ctl_name = NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER,
&sysctl_netrom_transport_maximum_tries, sizeof(int), 0644, NULL, .procname = "obsolescence_count_initialiser",
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_n2, &max_n2}, .data = &sysctl_netrom_obsolescence_count_initialiser,
{NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY, "transport_acknowledge_delay", .maxlen = sizeof(int),
&sysctl_netrom_transport_acknowledge_delay, sizeof(int), 0644, NULL, .mode = 0644,
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_t2, &max_t2}, .proc_handler = &proc_dointvec_minmax,
{NET_NETROM_TRANSPORT_BUSY_DELAY, "transport_busy_delay", .strategy = &sysctl_intvec,
&sysctl_netrom_transport_busy_delay, sizeof(int), 0644, NULL, .extra1 = &min_obs,
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_t4, &max_t4}, .extra2 = &max_obs
{NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE, "transport_requested_window_size", },
&sysctl_netrom_transport_requested_window_size, sizeof(int), 0644, NULL, {
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_window, &max_window}, .ctl_name = NET_NETROM_NETWORK_TTL_INITIALISER,
{NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT, "transport_no_activity_timeout", .procname = "network_ttl_initialiser",
&sysctl_netrom_transport_no_activity_timeout, sizeof(int), 0644, NULL, .data = &sysctl_netrom_network_ttl_initialiser,
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_idle, &max_idle}, .maxlen = sizeof(int),
{NET_NETROM_ROUTING_CONTROL, "routing_control", .mode = 0644,
&sysctl_netrom_routing_control, sizeof(int), 0644, NULL, .proc_handler = &proc_dointvec_minmax,
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_route, &max_route}, .strategy = &sysctl_intvec,
{NET_NETROM_LINK_FAILS_COUNT, "link_fails_count", .extra1 = &min_ttl,
&sysctl_netrom_link_fails_count, sizeof(int), 0644, NULL, .extra2 = &max_ttl
&proc_dointvec_minmax, &sysctl_intvec, NULL, &min_fails, &max_fails}, },
{0} {
.ctl_name = NET_NETROM_TRANSPORT_TIMEOUT,
.procname = "transport_timeout",
.data = &sysctl_netrom_transport_timeout,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_t1,
.extra2 = &max_t1
},
{
.ctl_name = NET_NETROM_TRANSPORT_MAXIMUM_TRIES,
.procname = "transport_maximum_tries",
.data = &sysctl_netrom_transport_maximum_tries,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_n2,
.extra2 = &max_n2
},
{
.ctl_name = NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY,
.procname = "transport_acknowledge_delay",
.data = &sysctl_netrom_transport_acknowledge_delay,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_t2,
.extra2 = &max_t2
},
{
.ctl_name = NET_NETROM_TRANSPORT_BUSY_DELAY,
.procname = "transport_busy_delay",
.data = &sysctl_netrom_transport_busy_delay,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_t4,
.extra2 = &max_t4
},
{
.ctl_name = NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE,
.procname = "transport_requested_window_size",
.data = &sysctl_netrom_transport_requested_window_size,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_window,
.extra2 = &max_window
},
{
.ctl_name = NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT,
.procname = "transport_no_activity_timeout",
.data = &sysctl_netrom_transport_no_activity_timeout,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_idle,
.extra2 = &max_idle
},
{
.ctl_name = NET_NETROM_ROUTING_CONTROL,
.procname = "routing_control",
.data = &sysctl_netrom_routing_control,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_route,
.extra2 = &max_route
},
{
.ctl_name = NET_NETROM_LINK_FAILS_COUNT,
.procname = "link_fails_count",
.data = &sysctl_netrom_link_fails_count,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_fails,
.extra2 = &max_fails
},
{ .ctl_name = 0 }
}; };
static ctl_table nr_dir_table[] = { static ctl_table nr_dir_table[] = {
{NET_NETROM, "netrom", NULL, 0, 0555, nr_table}, {
{0} .ctl_name = NET_NETROM,
.procname = "netrom",
.maxlen = 0,
.mode = 0555,
.child = nr_table
},
{ .ctl_name = 0 }
}; };
static ctl_table nr_root_table[] = { static ctl_table nr_root_table[] = {
{CTL_NET, "net", NULL, 0, 0555, nr_dir_table}, {
{0} .ctl_name = CTL_NET,
.procname = "net",
.maxlen = 0,
.mode = 0555,
.child = nr_dir_table
},
{ .ctl_name = 0 }
}; };
void __init nr_register_sysctl(void) void __init nr_register_sysctl(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment