summaryrefslogtreecommitdiff
path: root/mkdiskimage.in
diff options
context:
space:
mode:
authorhpa <hpa>2003-11-09 01:28:04 +0000
committerhpa <hpa>2003-11-09 01:28:04 +0000
commit0d238695d1d1d1af1a9e51c0676cf19dc41bcc96 (patch)
treeecab754ef3a51d43d210e086f0eca5b19afd5478 /mkdiskimage.in
parent638d6641ffb41d616368a73fcd076c7d0ca37017 (diff)
downloadsyslinux-0d238695d1d1d1af1a9e51c0676cf19dc41bcc96.tar.gz
Compute the end cylinder/head correctly.
Diffstat (limited to 'mkdiskimage.in')
-rwxr-xr-xmkdiskimage.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/mkdiskimage.in b/mkdiskimage.in
index 74ef3f30..e1b79499 100755
--- a/mkdiskimage.in
+++ b/mkdiskimage.in
@@ -89,9 +89,9 @@ $psize = $c*$h*$s-$s;
$bhead = ($h > 1) ? 1 : 0;
$bsect = 1;
$bcyl = ($h > 1) ? 0 : 1;
-$ehead = $h;
-$esect = $s + (($c & 0x300) >> 2);
-$ecyl = $c & 0xff;
+$ehead = $h-1;
+$esect = $s + ((($c-1) & 0x300) >> 2);
+$ecyl = ($c-1) & 0xff;
if ( $psize > 65536 ) {
$fstype = 0x06;
} else {