patch-2.2.8 linux/arch/ppc/boot/mkprep.c
Next file: linux/arch/ppc/common_defconfig
Previous file: linux/arch/ppc/boot/misc.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Thu Apr 29 12:39:01 1999
- Orig file:
v2.2.7/linux/arch/ppc/boot/mkprep.c
- Orig date:
Mon Oct 5 13:13:36 1998
diff -u --recursive --new-file v2.2.7/linux/arch/ppc/boot/mkprep.c linux/arch/ppc/boot/mkprep.c
@@ -14,15 +14,8 @@
* Modified for x86 hosted builds by Matt Porter <porter@neta.com>
*/
-#ifdef linux
-#include <linux/types.h>
-/*#include <asm/stat.h>*/
-/*#include <asm/byteorder.h>*/ /* the byte swap funcs don't work here -- Cort */
-#else
#include <unistd.h>
-#endif
#include <sys/stat.h>
-
#include <stdio.h>
#include <errno.h>
@@ -168,10 +161,10 @@
/* set entry point and boot image size skipping over elf header */
#ifdef __i386__
*entry = 0x400/*+65536*/;
- *length = info.st_size+0x400;
+ *length = info.st_size-elfhdr_size+0x400;
#else
*entry = cpu_to_le32(0x400/*+65536*/);
- *length = cpu_to_le32(info.st_size+0x400);
+ *length = cpu_to_le32(info.st_size-elfhdr_size+0x400);
#endif /* __i386__ */
/* sets magic number for msdos partition (used by linux) */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)