i386: build.c: Write out larger system size to bootsector
PATCH 1/1 i386: build.c: Write out larger system size to bootsector
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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).
- --- a/arch/i386/boot/tools/build.c 2005-08-07 18:08:29.000000000 -0600
+++ b/arch/i386/boot/tools/build.c 2005-08-07 18:09:51.000000000 -0600
@@ -177,7 +177,8 @@
die("Output: seek failed");
buf[0] = (sys_size & 0xff);
buf[1] = ((sys_size >> 8) & 0xff);
- - if (write(1, buf, 2) != 2)
+ buf[2] = ((sys_size >> 16) & 0xff);
+ if (write(1, buf, 3) != 3)
die("Write of image length failed");
return 0; /* Everything is OK */
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFC9r+raI0dwg4A47wRAtXCAKCm3f2Afx/SC5H+6HJz2JzM9cA1ZQCgjMbg qt7Rmo23aWfG1cvsZrcsQvA=
=0iHd
-----END PGP SIGNATURE-----