X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fproc%2Fproc_misc.c;h=f6d6f81dd446edad2bcca354819a850f71bef796;hb=6cc1b22a4acef3816eaa5f8c227d93d749b23195;hp=66bc425f2f3db467344dd81c841442c5806b985e;hpb=9361401eb7619c033e2394e4f9f6d410d6719ac7;p=mv-sheeva.git diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 66bc425f2f3..f6d6f81dd44 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -91,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, last_pid); + nr_running(), nr_threads, current->nsproxy->pid_ns->last_pid); return proc_calc_metrics(page, start, off, count, eof, len); } @@ -251,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); } @@ -646,7 +647,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf, if (get_user(c, buf)) return -EFAULT; - __handle_sysrq(c, NULL, NULL, 0); + __handle_sysrq(c, NULL, 0); } return count; } @@ -695,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