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

[PATCH] C99 initializers for net/sunrpc/sysctl.c

parent 444cdd80
...@@ -116,23 +116,51 @@ proc_dodebug(ctl_table *table, int write, struct file *file, ...@@ -116,23 +116,51 @@ proc_dodebug(ctl_table *table, int write, struct file *file,
return 0; return 0;
} }
#define DIRENTRY(nam1, nam2, child) \ static ctl_table debug_table[] = {
{CTL_##nam1, #nam2, NULL, 0, 0555, child } {
#define DBGENTRY(nam1, nam2) \ .ctl_name = CTL_RPCDEBUG,
{CTL_##nam1##DEBUG, #nam2 "_debug", &nam2##_debug, sizeof(int),\ .procname = "rpc_debug",
0644, NULL, &proc_dodebug} .data = &rpc_debug,
.maxlen = sizeof(int),
static ctl_table debug_table[] = { .mode = 0644,
DBGENTRY(RPC, rpc), .proc_handler = &proc_dodebug
DBGENTRY(NFS, nfs), },
DBGENTRY(NFSD, nfsd), {
DBGENTRY(NLM, nlm), .ctl_name = CTL_NFSDEBUG,
{0} .procname = "nfs_debug",
.data = &nfs_debug,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dodebug
},
{
.ctl_name = CTL_NFSDDEBUG,
.procname = "nfsd_debug",
.data = &nfsd_debug,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dodebug
},
{
.ctl_name = CTL_NLMDEBUG,
.procname = "nlm_debug",
.data = &nlm_debug,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dodebug
},
{ .ctl_name = 0 }
}; };
static ctl_table sunrpc_table[] = { static ctl_table sunrpc_table[] = {
DIRENTRY(SUNRPC, sunrpc, debug_table), {
{0} .ctl_name = CTL_SUNRPC,
.procname = "sunrpc",
.maxlen = 0,
.mode = 0555,
.child = debug_table
},
{ .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