projects
/
dosfstools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7821f2
)
Looks like heads per cylinder needs - 1
author
Robert Pengelly
<robertapengelly@hotmail.com>
Sat, 15 Jun 2024 21:44:13 +0000
(22:44 +0100)
committer
Robert Pengelly
<robertapengelly@hotmail.com>
Sat, 15 Jun 2024 21:44:13 +0000
(22:44 +0100)
mkfs.c
patch
|
blob
|
history
diff --git
a/mkfs.c
b/mkfs.c
index 311360754ff6fcad8cd47b111529f0368f163975..3fde2fe17ee2a646db1cdfb0189f897bf1fce797 100644
(file)
--- 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) {