patch-pre2.0.5 linux/arch/alpha/boot/main.c

Next file: linux/arch/alpha/boot/tools/build.c
Previous file: linux/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.4/linux/arch/alpha/boot/main.c linux/arch/alpha/boot/main.c
@@ -228,10 +228,11 @@
 
 	nbytes = dispatch(CCB_GET_ENV, ENV_BOOTED_OSFLAGS,
 			  envval, sizeof(envval));
-	if (nbytes > 0) {
-		envval[nbytes] = '\0';
-		strcpy((char*)ZERO_PAGE, envval);
+	if (nbytes < 0) {
+		nbytes = 0;
 	}
+	envval[nbytes] = '\0';
+	strcpy((char*)ZERO_PAGE, envval);
 
 	printk(" Ok\nNow booting the kernel\n");
 	runkernel();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this