Some DOSes in their CDos::ValidateFormatChangeAndReportProblem implementation may want to not only validate the new format but also adjust somehow the boot sector or FAT length (e.g. BS-DOS). However, the problem is that checking whether cylinders to reformat or remove are empty comes after the CDos::ValidateFormatChangeAndReportProblem method is called - this may put the disk into an inconsistent state. The correct behavior should first check whether cylinders are empty, and afterwards call the CDos::ValidateFormatChangeAndReportProblem method.
The CDos::ValidateFormatChangeAndReportProblem method is sometimes called with incorrect parameter describing whether the disk is being formatted from scratch or just partly adjusted (cylinders reformatted or removed).
There is no need to compile a list of tracks to format or remove. Tracks are not formatted randomly - instead, they are formatted in consecutive blocks (e.g. Cylinders 3 to 5, all heads).
Different DOSes use different values to mark standard sectors from removed tracks "unavailable". For instance, MDOS marks them Unavailable, whereas BS-DOS marks them Unknown. When removing tracks, it should be specified with which value to reset corresponding part of the FAT.
On failure, sometimes the reported error is _ERRORSUCCESS which makes no sense (probably a missing call to ::SetLastError).
The following problems have been found: