}
driveParams[i] = getDriveParam(cmosType);
diskChanged[i] = true;
}
} catch (NameNotFoundException ex) {
throw new ResourceNotFreeException("Cannot find CMOSService", ex);
}
try {
final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
final DMAManager dmaService = InitialNaming.lookup(DMAManager.NAME);
// PRESERVE THIS CLAIMING ORDER!
irq = rm.claimIRQ(owner, FLOPPY_IRQ, this, false);
dma = dmaService.claimDMAChannel(owner, FLOPPY_DMA);
io1 = claimPorts(rm, owner, startPort + OFFSET_RANGE1, NR_PORTS_RANGE1);
io2 = claimPorts(rm, owner, startPort + OFFSET_RANGE2, NR_PORTS_RANGE2);
dmaMem = rm.claimMemoryResource(owner, null, 64 * 1024, ResourceManager.MEMMODE_ALLOC_DMA);
} catch (NameNotFoundException ex) {
throw new ResourceNotFreeException("Cannot find ResourceManager or DMAService", ex);
} catch (ResourceNotFreeException ex) {
if (dmaMem != null) {
dmaMem.release();
}
if (io2 != null) {