public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b98f3d
)
p112: Pad floppy boot images to sector boundary
author
Will Sowerbutts
<will@sowerbutts.com>
Fri, 20 Feb 2015 21:34:35 +0000
(21:34 +0000)
committer
Will Sowerbutts
<will@sowerbutts.com>
Fri, 20 Feb 2015 21:36:14 +0000
(21:36 +0000)
Kernel/platform-p112/flopboot-mkimage
patch
|
blob
|
history
diff --git
a/Kernel/platform-p112/flopboot-mkimage
b/Kernel/platform-p112/flopboot-mkimage
index
43ad457
..
99cafc6
100755
(executable)
--- a/
Kernel/platform-p112/flopboot-mkimage
+++ b/
Kernel/platform-p112/flopboot-mkimage
@@
-29,5
+29,10
@@
kernel = open(sys.argv[2], 'rb').read()
# make the boot image
image = stamp_bootstrap(bootstrap, kernel) + kernel
+# pad image to even sector boundary
+pad = len(image) % 512
+if pad:
+ image += chr(0xE5) * (512-pad)
+
# write output file
open(sys.argv[3], 'wb').write(image)