]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] C99 initializers for net/sunrpc/sysctl.c
authorArt Haas <ahaas@airmail.net>
Wed, 12 Feb 2003 13:49:25 +0000 (05:49 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Wed, 12 Feb 2003 13:49:25 +0000 (05:49 -0800)
net/sunrpc/sysctl.c

index 90ecf123b3882c81677f0cf6cafd15bd8df51f5c..7d27211d375b01a685b5bd46fd082449573328b3 100644 (file)
@@ -116,23 +116,51 @@ done:
        return 0;
 }
 
-#define DIRENTRY(nam1, nam2, child)    \
-       {CTL_##nam1, #nam2, NULL, 0, 0555, child }
-#define DBGENTRY(nam1, nam2)   \
-       {CTL_##nam1##DEBUG, #nam2 "_debug", &nam2##_debug, sizeof(int),\
-        0644, NULL, &proc_dodebug}
-
-static ctl_table               debug_table[] = {
-       DBGENTRY(RPC,  rpc),
-       DBGENTRY(NFS,  nfs),
-       DBGENTRY(NFSD, nfsd),
-       DBGENTRY(NLM,  nlm),
-       {0}
+static ctl_table debug_table[] = {
+       {
+               .ctl_name       = CTL_RPCDEBUG,
+               .procname       = "rpc_debug",
+               .data           = &rpc_debug,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dodebug
+       }, 
+       {
+               .ctl_name       = CTL_NFSDEBUG,
+               .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[] = {
-       DIRENTRY(SUNRPC, sunrpc, debug_table),
-       {0}
+static ctl_table sunrpc_table[] = {
+       {
+               .ctl_name       = CTL_SUNRPC,
+               .procname       = "sunrpc",
+               .maxlen         = 0,
+               .mode           = 0555,
+               .child          = debug_table
+       },
+       { .ctl_name = 0 }
 };
 
 #endif