Commit 1625b32c authored by Art Haas's avatar Art Haas Committed by David S. Miller

[PATCH]: C99 initializers for net/core/sysctl_net_core.c

parent 24e08886
...@@ -36,59 +36,139 @@ extern char sysctl_divert_version[]; ...@@ -36,59 +36,139 @@ extern char sysctl_divert_version[];
ctl_table core_table[] = { ctl_table core_table[] = {
#ifdef CONFIG_NET #ifdef CONFIG_NET
{NET_CORE_WMEM_MAX, "wmem_max", {
&sysctl_wmem_max, sizeof(int), 0644, NULL, .ctl_name = NET_CORE_WMEM_MAX,
&proc_dointvec}, .procname = "wmem_max",
{NET_CORE_RMEM_MAX, "rmem_max", .data = &sysctl_wmem_max,
&sysctl_rmem_max, sizeof(int), 0644, NULL, .maxlen = sizeof(int),
&proc_dointvec}, .mode = 0644,
{NET_CORE_WMEM_DEFAULT, "wmem_default", .proc_handler = &proc_dointvec
&sysctl_wmem_default, sizeof(int), 0644, NULL, },
&proc_dointvec}, {
{NET_CORE_RMEM_DEFAULT, "rmem_default", .ctl_name = NET_CORE_RMEM_MAX,
&sysctl_rmem_default, sizeof(int), 0644, NULL, .procname = "rmem_max",
&proc_dointvec}, .data = &sysctl_rmem_max,
{NET_CORE_DEV_WEIGHT, "dev_weight", .maxlen = sizeof(int),
&weight_p, sizeof(int), 0644, NULL, .mode = 0644,
&proc_dointvec}, .proc_handler = &proc_dointvec
{NET_CORE_MAX_BACKLOG, "netdev_max_backlog", },
&netdev_max_backlog, sizeof(int), 0644, NULL, {
&proc_dointvec}, .ctl_name = NET_CORE_WMEM_DEFAULT,
{NET_CORE_NO_CONG_THRESH, "no_cong_thresh", .procname = "wmem_default",
&no_cong, sizeof(int), 0644, NULL, .data = &sysctl_wmem_default,
&proc_dointvec}, .maxlen = sizeof(int),
{NET_CORE_NO_CONG, "no_cong", .mode = 0644,
&no_cong, sizeof(int), 0644, NULL, .proc_handler = &proc_dointvec
&proc_dointvec}, },
{NET_CORE_LO_CONG, "lo_cong", {
&lo_cong, sizeof(int), 0644, NULL, .ctl_name = NET_CORE_RMEM_DEFAULT,
&proc_dointvec}, .procname = "rmem_default",
{NET_CORE_MOD_CONG, "mod_cong", .data = &sysctl_rmem_default,
&mod_cong, sizeof(int), 0644, NULL, .maxlen = sizeof(int),
&proc_dointvec}, .mode = 0644,
.proc_handler = &proc_dointvec
},
{
.ctl_name = NET_CORE_DEV_WEIGHT,
.procname = "dev_weight",
.data = &weight_p,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
{
.ctl_name = NET_CORE_MAX_BACKLOG,
.procname = "netdev_max_backlog",
.data = &netdev_max_backlog,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
{
.ctl_name = NET_CORE_NO_CONG_THRESH,
.procname = "no_cong_thresh",
.data = &no_cong,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
{
.ctl_name = NET_CORE_NO_CONG,
.procname = "no_cong",
.data = &no_cong,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
{
.ctl_name = NET_CORE_LO_CONG,
.procname = "lo_cong",
.data = &lo_cong,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
{
.ctl_name = NET_CORE_MOD_CONG,
.procname = "mod_cong",
.data = &mod_cong,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
#ifdef CONFIG_NET_FASTROUTE #ifdef CONFIG_NET_FASTROUTE
{NET_CORE_FASTROUTE, "netdev_fastroute", {
&netdev_fastroute, sizeof(int), 0644, NULL, .ctl_name = NET_CORE_FASTROUTE,
&proc_dointvec}, .procname = "netdev_fastroute",
.data = &netdev_fastroute,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
#endif #endif
{NET_CORE_MSG_COST, "message_cost", {
&net_msg_cost, sizeof(int), 0644, NULL, .ctl_name = NET_CORE_MSG_COST,
&proc_dointvec_jiffies}, .procname = "message_cost",
{NET_CORE_MSG_BURST, "message_burst", .data = &net_msg_cost,
&net_msg_burst, sizeof(int), 0644, NULL, .maxlen = sizeof(int),
&proc_dointvec_jiffies}, .mode = 0644,
{NET_CORE_OPTMEM_MAX, "optmem_max", .proc_handler = &proc_dointvec_jiffies
&sysctl_optmem_max, sizeof(int), 0644, NULL, },
&proc_dointvec}, {
{NET_CORE_HOT_LIST_LENGTH, "hot_list_length", .ctl_name = NET_CORE_MSG_BURST,
&sysctl_hot_list_len, sizeof(int), 0644, NULL, .procname = "message_burst",
&proc_dointvec}, .data = &net_msg_burst,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies
},
{
.ctl_name = NET_CORE_OPTMEM_MAX,
.procname = "optmem_max",
.data = &sysctl_optmem_max,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
{
.ctl_name = NET_CORE_HOT_LIST_LENGTH,
.procname = "hot_list_length",
.data = &sysctl_hot_list_len,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
},
#ifdef CONFIG_NET_DIVERT #ifdef CONFIG_NET_DIVERT
{NET_CORE_DIVERT_VERSION, "divert_version", {
(void *)sysctl_divert_version, 32, 0444, NULL, .ctl_name = NET_CORE_DIVERT_VERSION,
&proc_dostring}, .procname = "divert_version",
.data = (void *)sysctl_divert_version,
.maxlen = 32,
.mode = 0444,
.proc_handler = &proc_dostring
},
#endif /* CONFIG_NET_DIVERT */ #endif /* CONFIG_NET_DIVERT */
#endif /* CONFIG_NET */ #endif /* CONFIG_NET */
{ 0 } { .ctl_name = 0 }
}; };
#endif #endif
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