X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=kernel%2Fvserver%2Fsysctl.c;h=fffc0dd46145e22fa72210dd48dde7a73ff26485;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=32fde9a934f0b4fde14444c74859538dc37235c9;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/kernel/vserver/sysctl.c b/kernel/vserver/sysctl.c index 32fde9a93..fffc0dd46 100644 --- a/kernel/vserver/sysctl.c +++ b/kernel/vserver/sysctl.c @@ -25,15 +25,23 @@ #define CTL_VSERVER 4242 /* unused? */ enum { - CTL_DEBUG_SWITCH = 1, - CTL_DEBUG_LIMIT, - CTL_DEBUG_DLIMIT, + 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_dlimit = 0; +unsigned int vx_debug_dlim = 0; +unsigned int vx_debug_cvirt = 0; static struct ctl_table_header *vserver_table_header; @@ -49,7 +57,7 @@ void vserver_register_sysctl(void) // vserver_table[0].de->owner = THIS_MODULE; #endif } - + } void vserver_unregister_sysctl(void) @@ -62,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; } @@ -114,47 +122,88 @@ static int proc_dodebug(ctl_table *table, int write, done: *lenp -= left; - file->f_pos += *lenp; + *ppos += *lenp; return 0; } - + static ctl_table debug_table[] = { - { - .ctl_name = CTL_DEBUG_SWITCH, - .procname = "debug_switch", - .data = &vx_debug_switch, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dodebug - }, - { - .ctl_name = CTL_DEBUG_LIMIT, - .procname = "debug_limit", - .data = &vx_debug_limit, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dodebug - }, - { - .ctl_name = CTL_DEBUG_DLIMIT, - .procname = "debug_dlimit", - .data = &vx_debug_dlimit, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dodebug - }, - { .ctl_name = 0 } + { + .ctl_name = CTL_DEBUG_SWITCH, + .procname = "debug_switch", + .data = &vx_debug_switch, + .maxlen = sizeof(int), + .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", + .data = &vx_debug_limit, + .maxlen = sizeof(int), + .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 } }; static ctl_table vserver_table[] = { - { - .ctl_name = CTL_VSERVER, - .procname = "vserver", - .mode = 0555, - .child = debug_table - }, - { .ctl_name = 0 } + { + .ctl_name = CTL_VSERVER, + .procname = "vserver", + .mode = 0555, + .child = debug_table + }, + { .ctl_name = 0 } }; + +EXPORT_SYMBOL_GPL(vx_debug_switch); +EXPORT_SYMBOL_GPL(vx_debug_xid); +EXPORT_SYMBOL_GPL(vx_debug_nid); +EXPORT_SYMBOL_GPL(vx_debug_net); +EXPORT_SYMBOL_GPL(vx_debug_limit); +EXPORT_SYMBOL_GPL(vx_debug_dlim); +EXPORT_SYMBOL_GPL(vx_debug_cvirt); +