=================================================================== RCS file: /MkLinux/floppy-darwin/floppy.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- floppy-darwin/floppy.cpp 2002/04/29 23:50:37 1.53 +++ floppy-darwin/floppy.cpp 2002/05/29 07:22:06 1.54 @@ -84,8 +84,8 @@ // second parameter. You must use the literal name of the superclass. OSDefineMetaClassAndStructors(org_mklinux_iokit_swim3_driver, IOService) -static void handleInterrupt(org_mklinux_iokit_swim3_driver *self); -static void handleDMAInterrupt(org_mklinux_iokit_swim3_driver *self); +// static void handleInterrupt(org_mklinux_iokit_swim3_driver *self); +// static void handleDMAInterrupt(org_mklinux_iokit_swim3_driver *self); // static void org_mklinux_iokit_swim3_driver_NotifyMediaChange( // org_mklinux_iokit_swim3_driver *self, BSAccessibilityState status); @@ -174,6 +174,8 @@ org_mklinux_iokit_swim3_etable_new_sem(&AsyncLock); non_bsd_wakeup((void *)&AsyncLock); + fdFormatLock = IOLockAlloc(); + DAG_Rules=OSDynamicCast(AppleMacIODevice, provider); if (!DAG_Rules) { @@ -191,8 +193,10 @@ this->vaddr = (char *)fdMap->getVirtualAddress(); this->paddr = (char *)fdMap->getPhysicalAddress(); - kprintf("Floppy device 0x%x (0x%x phys)\n", this->vaddr, this->paddr); - dIOLog("Floppy device 0x%x (0x%x phys)\n", this->vaddr, this->paddr); + kprintf("Floppy device 0x%x (0x%x phys)\n", (unsigned int)this->vaddr, + (unsigned int)this->paddr); + dIOLog("Floppy device 0x%x (0x%x phys)\n", (unsigned int)this->vaddr, + (unsigned int)this->paddr); /* We have to allocate the bus_device so we can store the unit information, which we need in order to map the right DMA @@ -435,6 +439,7 @@ // IOLockFree(AsyncLock); } +#if 0 static void org_mklinux_iokit_swim3_driver_NotifyMediaChange( org_mklinux_iokit_swim3_driver *self, BSAccessibilityState status) { @@ -461,6 +466,7 @@ dIOLog("NotifyMediaChange: exit\n"); } +#endif void org_mklinux_iokit_swim3_driver::handleInterrupt( IOInterruptEventSource *src, int /*count*/ ) { @@ -526,7 +532,7 @@ dIOLog("swim3: calling doSyncReadWrite asynchronously\n"); retval = doSyncReadWrite(args.buffer, args.block, args.nblks); - dIOLog("swim3: calling completion routine for block %d-%d with status %d\n", args.block, (args.block+args.nblks-1), retval); + dIOLog("swim3: calling completion routine for block %ld-%ld with status %d\n", args.block, (args.block+args.nblks-1), retval); if (!retval) { IOStorage::complete(args.completion, retval, (retval ? 0 : (args.nblks * 512))); }