aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2007-01-10 08:45:28 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-10 12:33:59 -0500
commit3eb3c740f51c2126b53c2dde974c1c57e634aa7b (patch)
treebbc9a1152685d8ed97f231e4ff161d01d58f0fe2
parent8edf51a5ee38eb40de5449e131fd36450a229430 (diff)
[PATCH] fix linux banner format string
Revert previous attempts at messing with the linux banner string and simply use a separate format string for proc. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Acked-by: Olaf Hering <olaf@aepfle.de> Acked-by: Jean Delvare <khali@linux-fr.org> Cc: Andrey Borzenkov <arvidjaar@mail.ru> Cc: Andrew Morton <akpm@osdl.org> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Herbert Poetzl <herbert@13thfloor.at> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--Makefile31
-rw-r--r--fs/proc/proc_misc.c8
-rw-r--r--include/linux/kernel.h3
-rw-r--r--init/Makefile10
-rw-r--r--init/main.c8
-rw-r--r--init/version.c10
6 files changed, 32 insertions, 38 deletions
diff --git a/Makefile b/Makefile
index fb5b3ef9ab11..47669cb6c8fb 100644
--- a/Makefile
+++ b/Makefile
@@ -368,14 +368,10 @@ endif
368# Detect when mixed targets is specified, and make a second invocation 368# Detect when mixed targets is specified, and make a second invocation
369# of make so .config is not included in this case either (for *config). 369# of make so .config is not included in this case either (for *config).
370 370
371PHONY += generated_headers 371no-dot-config-targets := clean mrproper distclean \
372
373generated_headers: include/linux/version.h include/linux/compile.h \
374 include/linux/utsrelease.h
375
376no-dot-config-targets := generated_headers clean mrproper distclean \
377 cscope TAGS tags help %docs check% \ 372 cscope TAGS tags help %docs check% \
378 headers_% kernelrelease kernelversion 373 include/linux/version.h headers_% \
374 kernelrelease kernelversion
379 375
380config-targets := 0 376config-targets := 0
381mixed-targets := 0 377mixed-targets := 0
@@ -738,16 +734,6 @@ debug_kallsyms: .tmp_map$(last_kallsyms)
738 734
739endif # ifdef CONFIG_KALLSYMS 735endif # ifdef CONFIG_KALLSYMS
740 736
741# compile.h changes depending on hostname, generation number, etc,
742# so we regenerate it always.
743# mkcompile_h will make sure to only update the
744# actual file if its content has changed.
745
746include/linux/compile.h: FORCE
747 @echo ' CHK $@'
748 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
749 "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)"
750
751# vmlinux image - including updated kernel symbols 737# vmlinux image - including updated kernel symbols
752vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE 738vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
753ifdef CONFIG_HEADERS_CHECK 739ifdef CONFIG_HEADERS_CHECK
@@ -866,8 +852,8 @@ endif
866# prepare2 creates a makefile if using a separate output directory 852# prepare2 creates a makefile if using a separate output directory
867prepare2: prepare3 outputmakefile 853prepare2: prepare3 outputmakefile
868 854
869prepare1: prepare2 generated_headers include/asm include/config/auto.conf 855prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
870 856 include/asm include/config/auto.conf
871ifneq ($(KBUILD_MODULES),) 857ifneq ($(KBUILD_MODULES),)
872 $(Q)mkdir -p $(MODVERDIR) 858 $(Q)mkdir -p $(MODVERDIR)
873 $(Q)rm -f $(MODVERDIR)/* 859 $(Q)rm -f $(MODVERDIR)/*
@@ -936,14 +922,14 @@ export INSTALL_HDR_PATH
936HDRARCHES=$(filter-out generic,$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild))) 922HDRARCHES=$(filter-out generic,$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild)))
937 923
938PHONY += headers_install_all 924PHONY += headers_install_all
939headers_install_all: generated_headers scripts_basic FORCE 925headers_install_all: include/linux/version.h scripts_basic FORCE
940 $(Q)$(MAKE) $(build)=scripts scripts/unifdef 926 $(Q)$(MAKE) $(build)=scripts scripts/unifdef
941 $(Q)for arch in $(HDRARCHES); do \ 927 $(Q)for arch in $(HDRARCHES); do \
942 $(MAKE) ARCH=$$arch -f $(srctree)/scripts/Makefile.headersinst obj=include BIASMDIR=-bi-$$arch ;\ 928 $(MAKE) ARCH=$$arch -f $(srctree)/scripts/Makefile.headersinst obj=include BIASMDIR=-bi-$$arch ;\
943 done 929 done
944 930
945PHONY += headers_install 931PHONY += headers_install
946headers_install: generated_headers scripts_basic FORCE 932headers_install: include/linux/version.h scripts_basic FORCE
947 @if [ ! -r $(srctree)/include/asm-$(ARCH)/Kbuild ]; then \ 933 @if [ ! -r $(srctree)/include/asm-$(ARCH)/Kbuild ]; then \
948 echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \ 934 echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \
949 exit 1 ; fi 935 exit 1 ; fi
@@ -1040,7 +1026,8 @@ CLEAN_FILES += vmlinux System.map \
1040# Directories & files removed with 'make mrproper' 1026# Directories & files removed with 'make mrproper'
1041MRPROPER_DIRS += include/config include2 usr/include 1027MRPROPER_DIRS += include/config include2 usr/include
1042MRPROPER_FILES += .config .config.old include/asm .version .old_version \ 1028MRPROPER_FILES += .config .config.old include/asm .version .old_version \
1043 include/linux/autoconf.h include/linux/utsrelease.h include/linux/version.h \ 1029 include/linux/autoconf.h include/linux/version.h \
1030 include/linux/utsrelease.h \
1044 Module.symvers tags TAGS cscope* 1031 Module.symvers tags TAGS cscope*
1045 1032
1046# clean - Delete most, but leave enough to build external modules 1033# clean - Delete most, but leave enough to build external modules
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 92ea7743fe8f..b37ce33f67ea 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -47,7 +47,6 @@
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>
51#include <asm/uaccess.h> 50#include <asm/uaccess.h>
52#include <asm/pgtable.h> 51#include <asm/pgtable.h>
53#include <asm/io.h> 52#include <asm/io.h>
@@ -254,12 +253,7 @@ static int version_read_proc(char *page, char **start, off_t off,
254{ 253{
255 int len; 254 int len;
256 255
257 /* FIXED STRING! Don't touch! */ 256 len = snprintf(page, PAGE_SIZE, linux_proc_banner,
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, 257 utsname()->sysname,
264 utsname()->release, 258 utsname()->release,
265 utsname()->version); 259 utsname()->version);
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index b0c4a05a4b0c..63fb18dcac30 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -17,6 +17,9 @@
17#include <asm/byteorder.h> 17#include <asm/byteorder.h>
18#include <asm/bug.h> 18#include <asm/bug.h>
19 19
20extern const char linux_banner[];
21extern const char linux_proc_banner[];
22
20#define INT_MAX ((int)(~0U>>1)) 23#define INT_MAX ((int)(~0U>>1))
21#define INT_MIN (-INT_MAX - 1) 24#define INT_MIN (-INT_MAX - 1)
22#define UINT_MAX (~0U) 25#define UINT_MAX (~0U)
diff --git a/init/Makefile b/init/Makefile
index 9cd871ce5784..633a268d270d 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -15,6 +15,14 @@ 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
19$(obj)/version.o: include/linux/compile.h 18$(obj)/version.o: include/linux/compile.h
20 19
20# compile.h changes depending on hostname, generation number, etc,
21# so we regenerate it always.
22# mkcompile_h will make sure to only update the
23# actual file if its content has changed.
24
25include/linux/compile.h: FORCE
26 @echo ' CHK $@'
27 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
28 "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)"
diff --git a/init/main.c b/init/main.c
index bc27d72bbb19..d908d3e03344 100644
--- a/init/main.c
+++ b/init/main.c
@@ -50,9 +50,7 @@
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/pid_namespace.h> 53#include <linux/pid_namespace.h>
55#include <linux/compile.h>
56#include <linux/device.h> 54#include <linux/device.h>
57 55
58#include <asm/io.h> 56#include <asm/io.h>
@@ -482,12 +480,6 @@ void __init __attribute__((weak)) smp_setup_processor_id(void)
482{ 480{
483} 481}
484 482
485static const char linux_banner[] =
486 "Linux version " UTS_RELEASE
487 " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
488 " (" LINUX_COMPILER ")"
489 " " UTS_VERSION "\n";
490
491asmlinkage void __init start_kernel(void) 483asmlinkage void __init start_kernel(void)
492{ 484{
493 char * command_line; 485 char * command_line;
diff --git a/init/version.c b/init/version.c
index 9d96d36501ca..55abe76f4ec9 100644
--- a/init/version.c
+++ b/init/version.c
@@ -33,3 +33,13 @@ struct uts_namespace init_uts_ns = {
33 }, 33 },
34}; 34};
35EXPORT_SYMBOL_GPL(init_uts_ns); 35EXPORT_SYMBOL_GPL(init_uts_ns);
36
37/* FIXED STRING! Don't touch! */
38const char __init linux_banner[] =
39 "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
40 LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
41
42const char linux_proc_banner[] =
43 "%s version %s"
44 " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
45 " (" LINUX_COMPILER ") %s\n";