patch-2.4.23 linux-2.4.23/arch/ppc64/kernel/setup.c

Next file: linux-2.4.23/arch/ppc64/kernel/sys_ppc32.c
Previous file: linux-2.4.23/arch/ppc64/kernel/iSeries_setup.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/arch/ppc64/kernel/setup.c linux-2.4.23/arch/ppc64/kernel/setup.c
@@ -366,8 +366,11 @@
 					val = "hvc0";
 				}
 				if (val) {
-					i = strlen(cmd_line);
-					sprintf(cmd_line + i, " AUTOCONSOLE console=%s", val);
+					char tmp_cmd_line[512];
+					snprintf(tmp_cmd_line, 512, 
+						 "AUTOCONSOLE console=%s %s",
+						 val, cmd_line);
+					memcpy(cmd_line, tmp_cmd_line, 512);
 					printk("console= not found, add console=%s\ncmd_line is now %s\n",
 					       val, cmd_line);
 				}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)