Inhibit opening driver with PRAM

This commit is contained in:
Zane Kaminski 2020-07-15 02:13:25 -04:00
parent 8876749ae0
commit b55d31cec0

View File

@ -224,6 +224,11 @@ OSErr RDiskOpen(IOParamPtr p, DCtlPtr d) {
// Do nothing if already opened // Do nothing if already opened
if (d->dCtlStorage) { return noErr; } if (d->dCtlStorage) { return noErr; }
// Do nothing if inhibited
RDiskReadXPRAM(1, 4, &legacy_startup);
RDiskReadXPRAM(1, 5, &legacy_ram);
if ((legacy_startup & 0x07) == 0x04) { return noErr; }
// Allocate storage struct // Allocate storage struct
d->dCtlStorage = NewHandleSysClear(sizeof(RDiskStorage_t)); d->dCtlStorage = NewHandleSysClear(sizeof(RDiskStorage_t));
if (!d->dCtlStorage) { return openErr; } if (!d->dCtlStorage) { return openErr; }