[PATCH] ppc64: fix CONFIG_CMDLINE

Anton Blanchard anton at samba.org
Fri Sep 17 06:36:34 EST 2004


When I cleaned up our cmdline parsing, I missed a RELOC of
CONFIG_CMDLINE itself. Without it we copy something random into
cmd_line, but only when CONFIG_CMDLINE is enabled.

Signed-off-by: Anton Blanchard <anton at samba.org>

diff -puN arch/ppc64/kernel/prom.c~fix_cmdline arch/ppc64/kernel/prom.c
--- foobar3/arch/ppc64/kernel/prom.c~fix_cmdline	2004-09-16 16:20:43.696593190 +1000
+++ foobar3-anton/arch/ppc64/kernel/prom.c	2004-09-16 16:22:35.601831564 +1000
@@ -1646,7 +1646,7 @@ prom_init(unsigned long r3, unsigned lon
 
 	RELOC(cmd_line[0]) = 0;
 #ifdef CONFIG_CMDLINE
-	strlcpy(RELOC(cmd_line), CONFIG_CMDLINE, sizeof(cmd_line));
+	strlcpy(RELOC(cmd_line), RELOC(CONFIG_CMDLINE), sizeof(cmd_line));
 #endif /* CONFIG_CMDLINE */
 	if ((long)_prom->chosen > 0) {
 		prom_getprop(_prom->chosen, "bootargs", p, sizeof(cmd_line));
_



More information about the Linuxppc64-dev mailing list