From dc71768742b39bca298e9ca6c91e575cd4b140e6 Mon Sep 17 00:00:00 2001 From: WANG Cong Date: Tue, 31 Mar 2009 15:23:40 -0700 Subject: uml: don't use a too long string literal uml uses a concatenated string literal to store the contents of .config, but .config file content is varaible, it can be very long. Use an array of string literals instead. Signed-off-by: WANG Cong Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/kernel/config.c.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'arch/um/kernel/config.c.in') diff --git a/arch/um/kernel/config.c.in b/arch/um/kernel/config.c.in index c062cbfe386..bee154d1ba7 100644 --- a/arch/um/kernel/config.c.in +++ b/arch/um/kernel/config.c.in @@ -7,11 +7,15 @@ #include #include "init.h" -static __initdata char *config = "CONFIG"; +static __initdata const char *config[] = { +"CONFIG" +}; static int __init print_config(char *line, int *add) { - printf("%s", config); + int i; + for (i = 0; i < sizeof(config)/sizeof(config[0]); i++) + printf("%s", config[i]); exit(0); } -- cgit v1.2.3-70-g09d2