From bbeb201d0d9db9e4cdcb323fcbf2b772346a4e94 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Sat, 15 Jun 2024 22:44:13 +0100 Subject: [PATCH] Looks like heads per cylinder needs - 1 --- mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkfs.c b/mkfs.c index 3113607..3fde2fe 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1009,7 +1009,7 @@ static void write_reserved (void) { } write721_to_byte_array (bs.sectors_per_track, sectors_per_track); - write721_to_byte_array (bs.heads_per_cylinder, heads_per_cylinder); + write721_to_byte_array (bs.heads_per_cylinder, ((heads_per_cylinder >= 4) ? (heads_per_cylinder - 1) : heads_per_cylinder)); write741_to_byte_array (bs.hidden_sectors, hidden_sectors); if (total_sectors > USHRT_MAX) { -- 2.34.1