Fix incomplete format bug

Now zeroes 32760 bytes at the beginning of volume
This commit is contained in:
Zane Kaminski 2021-04-03 08:12:01 -04:00
parent 9044d3d12c
commit 56f233917c
3 changed files with 7 additions and 3 deletions

Binary file not shown.

Binary file not shown.

10
rdisk.c
View File

@ -275,9 +275,13 @@ OSErr RDCtl(CntrlParamPtr p, DCtlPtr d) {
case kFormat:
if (!c->status.diskInPlace || c->status.writeProt ||
!c->ramdisk) { return controlErr; }
long long zero = 0;
if (*MMU32bit) { copy24(c->ramdisk, (Ptr)(&zero), sizeof(zero)); }
else { copy24(c->ramdisk, StripAddress((Ptr)(&zero)), sizeof(zero)); }
long long z = 0;
Ptr pz;
if (*MMU32bit) { p = (Ptr)&z; }
else { StripAddress((Ptr)&z); }
for (int i = 0; i < 4095; i++) {
copy24(c->ramdisk + i * sizeof(z), pz, sizeof(z));
}
return noErr;
case kVerify:
if (!c->status.diskInPlace) { return controlErr; }