X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=kernel%2Fvserver%2Fsysctl.c;h=298c62f184cd2eddaaa7c257bb11846bbd4da3b5;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=562fc0eabc9d90c42de41ad98dd2c37738f92e10;hpb=b76fcd5f0c655b6e3e9bf534594357025421c66a;p=linux-2.6.git diff --git a/kernel/vserver/sysctl.c b/kernel/vserver/sysctl.c index 562fc0eab..298c62f18 100644 --- a/kernel/vserver/sysctl.c +++ b/kernel/vserver/sysctl.c @@ -26,12 +26,22 @@ enum { CTL_DEBUG_SWITCH = 1, + CTL_DEBUG_XID, + CTL_DEBUG_NID, + CTL_DEBUG_NET, CTL_DEBUG_LIMIT, + CTL_DEBUG_DLIM, + CTL_DEBUG_CVIRT, }; unsigned int vx_debug_switch = 0; +unsigned int vx_debug_xid = 0; +unsigned int vx_debug_nid = 0; +unsigned int vx_debug_net = 0; unsigned int vx_debug_limit = 0; +unsigned int vx_debug_dlim = 0; +unsigned int vx_debug_cvirt = 0; static struct ctl_table_header *vserver_table_header; @@ -60,13 +70,13 @@ void vserver_unregister_sysctl(void) static int proc_dodebug(ctl_table *table, int write, - struct file *file, void *buffer, size_t *lenp) + struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) { char tmpbuf[20], *p, c; unsigned int value; size_t left, len; - if ((file->f_pos && !write) || !*lenp) { + if ((*ppos && !write) || !*lenp) { *lenp = 0; return 0; } @@ -112,7 +122,7 @@ static int proc_dodebug(ctl_table *table, int write, done: *lenp -= left; - file->f_pos += *lenp; + *ppos += *lenp; return 0; } @@ -127,6 +137,30 @@ static ctl_table debug_table[] = { .mode = 0644, .proc_handler = &proc_dodebug }, + { + .ctl_name = CTL_DEBUG_XID, + .procname = "debug_xid", + .data = &vx_debug_xid, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dodebug + }, + { + .ctl_name = CTL_DEBUG_NID, + .procname = "debug_nid", + .data = &vx_debug_nid, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dodebug + }, + { + .ctl_name = CTL_DEBUG_NET, + .procname = "debug_net", + .data = &vx_debug_net, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dodebug + }, { .ctl_name = CTL_DEBUG_LIMIT, .procname = "debug_limit", @@ -135,6 +169,22 @@ static ctl_table debug_table[] = { .mode = 0644, .proc_handler = &proc_dodebug }, + { + .ctl_name = CTL_DEBUG_DLIM, + .procname = "debug_dlim", + .data = &vx_debug_dlim, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dodebug + }, + { + .ctl_name = CTL_DEBUG_CVIRT, + .procname = "debug_cvirt", + .data = &vx_debug_cvirt, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dodebug + }, { .ctl_name = 0 } }; @@ -148,3 +198,6 @@ static ctl_table vserver_table[] = { { .ctl_name = 0 } }; + +EXPORT_SYMBOL_GPL(vx_debug_dlim); +