X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fproc%2Fproc_misc.c;h=f6d6f81dd446edad2bcca354819a850f71bef796;hb=6cc1b22a4acef3816eaa5f8c227d93d749b23195;hp=93c43b676e59f374813e9ae7095470ce9c23b87c;hpb=4ad99f15c6a3cadf36928c399459ea4fdb3d49f9;p=mv-sheeva.git diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 93c43b676e5..f6d6f81dd44 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include @@ -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); } @@ -696,9 +696,11 @@ void __init proc_misc_init(void) proc_symlink("mounts", NULL, "self/mounts"); /* And now for trickier ones */ +#ifdef CONFIG_PRINTK entry = create_proc_entry("kmsg", S_IRUSR, &proc_root); if (entry) entry->proc_fops = &proc_kmsg_operations; +#endif create_seq_entry("devices", 0, &proc_devinfo_operations); create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations); #ifdef CONFIG_BLOCK