diff options
-rw-r--r-- | fs/proc/proc_misc.c | 12 | ||||
-rw-r--r-- | include/linux/kernel.h | 2 | ||||
-rw-r--r-- | init/main.c | 8 | ||||
-rw-r--r-- | init/version.c | 5 |
4 files changed, 17 insertions, 10 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index dc3e580d1dca..92ea7743fe8f 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/vmalloc.h> | 47 | #include <linux/vmalloc.h> |
48 | #include <linux/crash_dump.h> | 48 | #include <linux/crash_dump.h> |
49 | #include <linux/pid_namespace.h> | 49 | #include <linux/pid_namespace.h> |
50 | #include <linux/compile.h> | ||
50 | #include <asm/uaccess.h> | 51 | #include <asm/uaccess.h> |
51 | #include <asm/pgtable.h> | 52 | #include <asm/pgtable.h> |
52 | #include <asm/io.h> | 53 | #include <asm/io.h> |
@@ -253,8 +254,15 @@ static int version_read_proc(char *page, char **start, off_t off, | |||
253 | { | 254 | { |
254 | int len; | 255 | int len; |
255 | 256 | ||
256 | len = sprintf(page, linux_banner, | 257 | /* FIXED STRING! Don't touch! */ |
257 | utsname()->release, utsname()->version); | 258 | len = snprintf(page, PAGE_SIZE, |
259 | "%s version %s" | ||
260 | " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")" | ||
261 | " (" LINUX_COMPILER ")" | ||
262 | " %s\n", | ||
263 | utsname()->sysname, | ||
264 | utsname()->release, | ||
265 | utsname()->version); | ||
258 | return proc_calc_metrics(page, start, off, count, eof, len); | 266 | return proc_calc_metrics(page, start, off, count, eof, len); |
259 | } | 267 | } |
260 | 268 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e8bfac34d2ba..b0c4a05a4b0c 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -17,8 +17,6 @@ | |||
17 | #include <asm/byteorder.h> | 17 | #include <asm/byteorder.h> |
18 | #include <asm/bug.h> | 18 | #include <asm/bug.h> |
19 | 19 | ||
20 | extern const char linux_banner[]; | ||
21 | |||
22 | #define INT_MAX ((int)(~0U>>1)) | 20 | #define INT_MAX ((int)(~0U>>1)) |
23 | #define INT_MIN (-INT_MAX - 1) | 21 | #define INT_MIN (-INT_MAX - 1) |
24 | #define UINT_MAX (~0U) | 22 | #define UINT_MAX (~0U) |
diff --git a/init/main.c b/init/main.c index 036f97c0c34c..fcd9ddc3ccf5 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -483,6 +483,12 @@ void __init __attribute__((weak)) smp_setup_processor_id(void) | |||
483 | { | 483 | { |
484 | } | 484 | } |
485 | 485 | ||
486 | static const char linux_banner[] = | ||
487 | "Linux version " UTS_RELEASE | ||
488 | " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")" | ||
489 | " (" LINUX_COMPILER ")" | ||
490 | " " UTS_VERSION "\n"; | ||
491 | |||
486 | asmlinkage void __init start_kernel(void) | 492 | asmlinkage void __init start_kernel(void) |
487 | { | 493 | { |
488 | char * command_line; | 494 | char * command_line; |
@@ -509,7 +515,7 @@ asmlinkage void __init start_kernel(void) | |||
509 | boot_cpu_init(); | 515 | boot_cpu_init(); |
510 | page_address_init(); | 516 | page_address_init(); |
511 | printk(KERN_NOTICE); | 517 | printk(KERN_NOTICE); |
512 | printk(linux_banner, UTS_RELEASE, UTS_VERSION); | 518 | printk(linux_banner); |
513 | setup_arch(&command_line); | 519 | setup_arch(&command_line); |
514 | unwind_setup(); | 520 | unwind_setup(); |
515 | setup_per_cpu_areas(); | 521 | setup_per_cpu_areas(); |
diff --git a/init/version.c b/init/version.c index 2a5dfcd1c2e6..9d96d36501ca 100644 --- a/init/version.c +++ b/init/version.c | |||
@@ -33,8 +33,3 @@ struct uts_namespace init_uts_ns = { | |||
33 | }, | 33 | }, |
34 | }; | 34 | }; |
35 | EXPORT_SYMBOL_GPL(init_uts_ns); | 35 | EXPORT_SYMBOL_GPL(init_uts_ns); |
36 | |||
37 | const char linux_banner[] = | ||
38 | "Linux version %s (" LINUX_COMPILE_BY "@" | ||
39 | LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") %s\n"; | ||
40 | |||