aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/proc/proc_misc.c12
-rw-r--r--include/linux/kernel.h2
-rw-r--r--init/main.c8
-rw-r--r--init/version.c5
4 files changed, 17 insertions, 10 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index dc3e580d1dc..92ea7743fe8 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -47,6 +47,7 @@
#include <linux/vmalloc.h>
#include <linux/crash_dump.h>
#include <linux/pid_namespace.h>
+#include <linux/compile.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/io.h>
@@ -253,8 +254,15 @@ static int version_read_proc(char *page, char **start, off_t off,
{
int len;
- len = sprintf(page, linux_banner,
- utsname()->release, utsname()->version);
+ /* FIXED STRING! Don't touch! */
+ len = snprintf(page, PAGE_SIZE,
+ "%s version %s"
+ " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
+ " (" LINUX_COMPILER ")"
+ " %s\n",
+ utsname()->sysname,
+ utsname()->release,
+ utsname()->version);
return proc_calc_metrics(page, start, off, count, eof, len);
}
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index e8bfac34d2b..b0c4a05a4b0 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -17,8 +17,6 @@
#include <asm/byteorder.h>
#include <asm/bug.h>
-extern const char linux_banner[];
-
#define INT_MAX ((int)(~0U>>1))
#define INT_MIN (-INT_MAX - 1)
#define UINT_MAX (~0U)
diff --git a/init/main.c b/init/main.c
index 036f97c0c34..fcd9ddc3ccf 100644
--- a/init/main.c
+++ b/init/main.c
@@ -483,6 +483,12 @@ void __init __attribute__((weak)) smp_setup_processor_id(void)
{
}
+static const char linux_banner[] =
+ "Linux version " UTS_RELEASE
+ " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
+ " (" LINUX_COMPILER ")"
+ " " UTS_VERSION "\n";
+
asmlinkage void __init start_kernel(void)
{
char * command_line;
@@ -509,7 +515,7 @@ asmlinkage void __init start_kernel(void)
boot_cpu_init();
page_address_init();
printk(KERN_NOTICE);
- printk(linux_banner, UTS_RELEASE, UTS_VERSION);
+ printk(linux_banner);
setup_arch(&command_line);
unwind_setup();
setup_per_cpu_areas();
diff --git a/init/version.c b/init/version.c
index 2a5dfcd1c2e..9d96d36501c 100644
--- a/init/version.c
+++ b/init/version.c
@@ -33,8 +33,3 @@ struct uts_namespace init_uts_ns = {
},
};
EXPORT_SYMBOL_GPL(init_uts_ns);
-
-const char linux_banner[] =
- "Linux version %s (" LINUX_COMPILE_BY "@"
- LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") %s\n";
-