From 3ec5ae0b9d6c9a01c2bb10a567327e7f96c6b0d8 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 1 Nov 2007 15:53:25 -0700 Subject: [PATCH] mkdiskimage: correct the partition type for > 1024 cylinders Generate the correct partition type for > 1024 cylinders. --- mkdiskimage.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkdiskimage.in b/mkdiskimage.in index 1d66dd4..14a430d 100755 --- a/mkdiskimage.in +++ b/mkdiskimage.in @@ -188,7 +188,7 @@ $bcyl = ($h > 1) ? 0 : 1; $ehead = $h-1; $esect = $s + ((($cc-1) & 0x300) >> 2); $ecyl = ($cc-1) & 0xff; -if ( $cc > 1024 ) { +if ( $c > 1024 ) { $fstype = 0x0e; } elsif ( $psize > 65536 ) { $fstype = 0x06; @@ -275,13 +275,13 @@ print OUTPUT pack("V", ($offset-$header_size)>>9); # Set the partition type if ( $opt{'F'} ) { - if ( $cc > 1024 ) { + if ( $c > 1024 ) { $fstype = 0x0c; # FAT32 LBA } else { $fstype = 0x0b; } } else { - if ( $cc > 1024 ) { + if ( $c > 1024 ) { $fstype = 0x0e; # FAT16 LBA } elsif ( $psize > 65536 ) { $fstype = 0x06; # FAT16 > 32MB -- 2.7.4