patch-2.4.21 linux-2.4.21/arch/ppc64/boot/addSystemMap.c

Next file: linux-2.4.21/arch/ppc64/boot/zImage.c
Previous file: linux-2.4.21/arch/ppc64/boot/addRamDisk.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/arch/ppc64/boot/addSystemMap.c linux-2.4.21/arch/ppc64/boot/addSystemMap.c
@@ -146,10 +146,8 @@
   /* Process the Sysmap file to determine the true end of the kernel */
 	sysmapPages = sysmapLen / 4096;
 	printf("System map pages to copy = %ld\n", sysmapPages);
-	for (i=0; i<sysmapPages; ++i)
-	{
-		get4k(sysmap, inbuf);
-	}
+	/* read the whole file line by line, expect that it doesnt fail */
+	while ( fgets(inbuf, 4096, sysmap) )  ;
 	/* search for _end in the last page of the system map */
 	ptr_end = strstr(inbuf, " _end");
 	if (!ptr_end)

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