mirror of
https://github.com/garrettsworkshop/MacIIROMDiskDriver.git
synced 2024-11-22 03:30:58 +00:00
Inhibit opening driver with PRAM
This commit is contained in:
parent
8876749ae0
commit
b55d31cec0
5
rdisk.c
5
rdisk.c
@ -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; }
|
||||||
|
Loading…
Reference in New Issue
Block a user