sys: support 256 sectors per cluster

This was overlooked in the earlier commits because SYS
uses its own BPB structures and name for the SPC field.
This commit is contained in:
C. Masloch 2023-01-10 11:16:01 +01:00 committed by Kenneth J Davis
parent 2efe4ab9f4
commit 7115d69cd2
1 changed files with 1 additions and 1 deletions

View File

@ -1506,7 +1506,7 @@ void put_boot(SYSOptions *opts)
totalSectors = bs32->bsSectors ? bs32->bsSectors : bs32->bsHugeSectors;
dataSectors = totalSectors
- bs32->bsResSectors - (bs32->bsFATs * fatSize) - rootDirSectors;
clusters = dataSectors / bs32->bsSecPerClust;
clusters = dataSectors / (((bs32->bsSecPerClust - 1) & 0xFF) + 1);
if (clusters < FAT_MAGIC) /* < 4085 */
fs = FAT12;