diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre3/kernel/sysctl.c linux-2.6.11.7-vs2.0-pre3-uts/kernel/sysctl.c --- linux-2.6.11.7-vs2.0-pre3/kernel/sysctl.c 2005-05-01 03:10:33.000000000 +0200 +++ linux-2.6.11.7-vs2.0-pre3-uts/kernel/sysctl.c 2005-05-01 04:57:11.000000000 +0200 @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -1444,14 +1445,36 @@ static int proc_doutsstring(ctl_table *t void __user *buffer, size_t *lenp, loff_t *ppos) { int r; + ctl_table tbl; + tbl.maxlen = table->maxlen; + + switch (table->ctl_name) { + case KERN_OSTYPE: + tbl.data = vx_new_uts(sysname); + break; + case KERN_OSRELEASE: + tbl.data = vx_new_uts(release); + break; + case KERN_VERSION: + tbl.data = vx_new_uts(version); + break; + case KERN_NODENAME: + tbl.data = vx_new_uts(nodename); + break; + case KERN_DOMAINNAME: + tbl.data = vx_new_uts(domainname); + break; + default: /* Not virtualized is still better than an Oops... */ + tbl.data = table->data; + } if (!write) { down_read(&uts_sem); - r=proc_dostring(table,0,filp,buffer,lenp, ppos); + r=proc_dostring(&tbl,0,filp,buffer,lenp, ppos); up_read(&uts_sem); } else { down_write(&uts_sem); - r=proc_dostring(table,1,filp,buffer,lenp, ppos); + r=proc_dostring(&tbl,1,filp,buffer,lenp, ppos); up_write(&uts_sem); } return r;