aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r--fs/proc/proc_misc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 93c43b676e59..b37ce33f67ea 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -39,13 +39,14 @@
39#include <linux/seq_file.h> 39#include <linux/seq_file.h>
40#include <linux/times.h> 40#include <linux/times.h>
41#include <linux/profile.h> 41#include <linux/profile.h>
42#include <linux/utsname.h>
42#include <linux/blkdev.h> 43#include <linux/blkdev.h>
43#include <linux/hugetlb.h> 44#include <linux/hugetlb.h>
44#include <linux/jiffies.h> 45#include <linux/jiffies.h>
45#include <linux/sysrq.h> 46#include <linux/sysrq.h>
46#include <linux/vmalloc.h> 47#include <linux/vmalloc.h>
47#include <linux/crash_dump.h> 48#include <linux/crash_dump.h>
48#include <linux/pspace.h> 49#include <linux/pid_namespace.h>
49#include <asm/uaccess.h> 50#include <asm/uaccess.h>
50#include <asm/pgtable.h> 51#include <asm/pgtable.h>
51#include <asm/io.h> 52#include <asm/io.h>
@@ -92,7 +93,7 @@ static int loadavg_read_proc(char *page, char **start, off_t off,
92 LOAD_INT(a), LOAD_FRAC(a), 93 LOAD_INT(a), LOAD_FRAC(a),
93 LOAD_INT(b), LOAD_FRAC(b), 94 LOAD_INT(b), LOAD_FRAC(b),
94 LOAD_INT(c), LOAD_FRAC(c), 95 LOAD_INT(c), LOAD_FRAC(c),
95 nr_running(), nr_threads, init_pspace.last_pid); 96 nr_running(), nr_threads, current->nsproxy->pid_ns->last_pid);
96 return proc_calc_metrics(page, start, off, count, eof, len); 97 return proc_calc_metrics(page, start, off, count, eof, len);
97} 98}
98 99
@@ -252,8 +253,10 @@ static int version_read_proc(char *page, char **start, off_t off,
252{ 253{
253 int len; 254 int len;
254 255
255 strcpy(page, linux_banner); 256 len = snprintf(page, PAGE_SIZE, linux_proc_banner,
256 len = strlen(page); 257 utsname()->sysname,
258 utsname()->release,
259 utsname()->version);
257 return proc_calc_metrics(page, start, off, count, eof, len); 260 return proc_calc_metrics(page, start, off, count, eof, len);
258} 261}
259 262
@@ -696,9 +699,11 @@ void __init proc_misc_init(void)
696 proc_symlink("mounts", NULL, "self/mounts"); 699 proc_symlink("mounts", NULL, "self/mounts");
697 700
698 /* And now for trickier ones */ 701 /* And now for trickier ones */
702#ifdef CONFIG_PRINTK
699 entry = create_proc_entry("kmsg", S_IRUSR, &proc_root); 703 entry = create_proc_entry("kmsg", S_IRUSR, &proc_root);
700 if (entry) 704 if (entry)
701 entry->proc_fops = &proc_kmsg_operations; 705 entry->proc_fops = &proc_kmsg_operations;
706#endif
702 create_seq_entry("devices", 0, &proc_devinfo_operations); 707 create_seq_entry("devices", 0, &proc_devinfo_operations);
703 create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations); 708 create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
704#ifdef CONFIG_BLOCK 709#ifdef CONFIG_BLOCK