10 #include <linux/types.h>
11 #include <linux/linkage.h>
12 #include <linux/ctype.h>
14 #include <linux/sysctl.h>
15 #include <linux/module.h>
17 #include <asm/uaccess.h>
46 rpc_register_sysctl(
void)
48 if (!sunrpc_table_header)
53 rpc_unregister_sysctl(
void)
55 if (sunrpc_table_header) {
57 sunrpc_table_header =
NULL;
62 void __user *
buffer,
size_t *lenp, loff_t *ppos)
67 if ((*ppos && !write) || !*lenp) {
77 void __user *buffer,
size_t *lenp, loff_t *ppos)
79 char tmpbuf[20],
c, *
s;
84 if ((*ppos && !write) || !*lenp) {
100 if (left >
sizeof(tmpbuf) - 1)
106 for (s = tmpbuf, value = 0;
'0' <= *s && *s <=
'9'; s++, left--)
107 value = 10 * value + (*s -
'0');
112 *(
unsigned int *) table->
data = value;
119 len =
sprintf(tmpbuf,
"%d", *(
unsigned int *) table->
data);
124 if ((left -= len) > 0) {
125 if (
put_user(
'\n', (
char __user *)buffer + len))
142 .maxlen =
sizeof(
int),
147 .procname =
"nfs_debug",
149 .maxlen =
sizeof(
int),
154 .procname =
"nfsd_debug",
156 .maxlen =
sizeof(
int),
161 .procname =
"nlm_debug",
163 .maxlen =
sizeof(
int),
168 .procname =
"transports",
171 .proc_handler = proc_do_xprt,