<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Frank Sorenson &lt;frank@tuxrocks.com&gt;

This patch allows build.c to write out the full system size to the
bootsector for system sizes larger than about 1 MB (1048560 bytes) by using
another byte (a 4th byte would allow system sizes larger than 268 MB).

Signed-off-by: Frank Sorenson &lt;frank@tuxrocks.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
---

 arch/i386/boot/tools/build.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN arch/i386/boot/tools/build.c~i386-buildc-write-out-larger-system-size-to-bootsector arch/i386/boot/tools/build.c
--- devel/arch/i386/boot/tools/build.c~i386-buildc-write-out-larger-system-size-to-bootsector	2005-08-08 22:23:04.000000000 -0700
+++ devel-akpm/arch/i386/boot/tools/build.c	2005-08-08 22:23:04.000000000 -0700
@@ -177,7 +177,8 @@ int main(int argc, char ** argv)
 		die("Output: seek failed");
 	buf[0] = (sys_size &amp; 0xff);
 	buf[1] = ((sys_size &gt;&gt; 8) &amp; 0xff);
-	if (write(1, buf, 2) != 2)
+	buf[2] = ((sys_size &gt;&gt; 16) &amp; 0xff);
+	if (write(1, buf, 3) != 3)
 		die("Write of image length failed");
 
 	return 0;					    /* Everything is OK */
_
</pre></body></html>