aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/proc/proc_misc.c4
-rw-r--r--init/Makefile1
-rw-r--r--init/main.c4
-rw-r--r--init/version.c5
4 files changed, 9 insertions, 5 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 51815cece6f3..9397ff62553e 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -252,8 +252,8 @@ static int version_read_proc(char *page, char **start, off_t off,
252{ 252{
253 int len; 253 int len;
254 254
255 strcpy(page, linux_banner); 255 len = sprintf(page, linux_banner,
256 len = strlen(page); 256 utsname()->release, utsname()->version);
257 return proc_calc_metrics(page, start, off, count, eof, len); 257 return proc_calc_metrics(page, start, off, count, eof, len);
258} 258}
259 259
diff --git a/init/Makefile b/init/Makefile
index 633a268d270d..d6c764d0eabb 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -15,6 +15,7 @@ clean-files := ../include/linux/compile.h
15 15
16# dependencies on generated files need to be listed explicitly 16# dependencies on generated files need to be listed explicitly
17 17
18$(obj)/main.o: include/linux/compile.h
18$(obj)/version.o: include/linux/compile.h 19$(obj)/version.o: include/linux/compile.h
19 20
20# compile.h changes depending on hostname, generation number, etc, 21# compile.h changes depending on hostname, generation number, etc,
diff --git a/init/main.c b/init/main.c
index 1174ae3aec8c..4cdcd06e6d78 100644
--- a/init/main.c
+++ b/init/main.c
@@ -50,6 +50,8 @@
50#include <linux/buffer_head.h> 50#include <linux/buffer_head.h>
51#include <linux/debug_locks.h> 51#include <linux/debug_locks.h>
52#include <linux/lockdep.h> 52#include <linux/lockdep.h>
53#include <linux/utsrelease.h>
54#include <linux/compile.h>
53 55
54#include <asm/io.h> 56#include <asm/io.h>
55#include <asm/bugs.h> 57#include <asm/bugs.h>
@@ -506,7 +508,7 @@ asmlinkage void __init start_kernel(void)
506 boot_cpu_init(); 508 boot_cpu_init();
507 page_address_init(); 509 page_address_init();
508 printk(KERN_NOTICE); 510 printk(KERN_NOTICE);
509 printk(linux_banner); 511 printk(linux_banner, UTS_RELEASE, UTS_VERSION);
510 setup_arch(&command_line); 512 setup_arch(&command_line);
511 unwind_setup(); 513 unwind_setup();
512 setup_per_cpu_areas(); 514 setup_per_cpu_areas();
diff --git a/init/version.c b/init/version.c
index 8f28344d9c70..2a5dfcd1c2e6 100644
--- a/init/version.c
+++ b/init/version.c
@@ -35,5 +35,6 @@ struct uts_namespace init_uts_ns = {
35EXPORT_SYMBOL_GPL(init_uts_ns); 35EXPORT_SYMBOL_GPL(init_uts_ns);
36 36
37const char linux_banner[] = 37const char linux_banner[] =
38 "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" 38 "Linux version %s (" LINUX_COMPILE_BY "@"
39 LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; 39 LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") %s\n";
40