[Patch] i386: build.c: Write out larger system size to bootsector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----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).

Signed-off-by: Frank Sorenson <[email protected]>

- --- 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-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux