]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/proc/proc_misc.c
[PATCH] use current->nsproxy->pid_ns
[mv-sheeva.git] / fs / proc / proc_misc.c
index 51815cece6f37cd92852d6b753049f12ce19bad6..f6d6f81dd446edad2bcca354819a850f71bef796 100644 (file)
@@ -45,7 +45,7 @@
 #include <linux/sysrq.h>
 #include <linux/vmalloc.h>
 #include <linux/crash_dump.h>
-#include <linux/pspace.h>
+#include <linux/pid_namespace.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/io.h>
@@ -92,7 +92,7 @@ static int loadavg_read_proc(char *page, char **start, off_t off,
                LOAD_INT(a), LOAD_FRAC(a),
                LOAD_INT(b), LOAD_FRAC(b),
                LOAD_INT(c), LOAD_FRAC(c),
-               nr_running(), nr_threads, init_pspace.last_pid);
+               nr_running(), nr_threads, current->nsproxy->pid_ns->last_pid);
        return proc_calc_metrics(page, start, off, count, eof, len);
 }
 
@@ -252,8 +252,8 @@ static int version_read_proc(char *page, char **start, off_t off,
 {
        int len;
 
-       strcpy(page, linux_banner);
-       len = strlen(page);
+       len = sprintf(page, linux_banner,
+               utsname()->release, utsname()->version);
        return proc_calc_metrics(page, start, off, count, eof, len);
 }