diff --git a/reactos/drivers/storage/floppy/csqrtns.c b/reactos/drivers/storage/floppy/csqrtns.c index 48608a95d6d..c9a703c661b 100644 --- a/reactos/drivers/storage/floppy/csqrtns.c +++ b/reactos/drivers/storage/floppy/csqrtns.c @@ -70,7 +70,7 @@ VOID NTAPI CsqRemoveIrp(PIO_CSQ UnusedCsq, */ { UNREFERENCED_PARAMETER(UnusedCsq); - DPRINT("CSQ: Removing IRP 0x%x\n", Irp); + DPRINT("CSQ: Removing IRP 0x%p\n", Irp); RemoveEntryList(&Irp->Tail.Overlay.ListEntry); } @@ -148,7 +148,7 @@ VOID NTAPI CsqCompleteCanceledIrp(PIO_CSQ UnusedCsq, */ { UNREFERENCED_PARAMETER(UnusedCsq); - DPRINT("CSQ: Canceling irp 0x%x\n", Irp); + DPRINT("CSQ: Canceling irp 0x%p\n", Irp); Irp->IoStatus.Status = STATUS_CANCELLED; Irp->IoStatus.Information = 0; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -173,7 +173,7 @@ VOID NTAPI CsqInsertIrp(PIO_CSQ UnusedCsq, */ { UNREFERENCED_PARAMETER(UnusedCsq); - DPRINT("CSQ: Inserting IRP 0x%x\n", Irp); + DPRINT("CSQ: Inserting IRP 0x%p\n", Irp); InsertTailList(&IrpQueue, &Irp->Tail.Overlay.ListEntry); KeReleaseSemaphore(&QueueSemaphore, 0, 1, FALSE); } diff --git a/reactos/drivers/storage/floppy/floppy.c b/reactos/drivers/storage/floppy/floppy.c index dd341a93a34..caba485eb4a 100644 --- a/reactos/drivers/storage/floppy/floppy.c +++ b/reactos/drivers/storage/floppy/floppy.c @@ -674,7 +674,7 @@ static NTSTATUS NTAPI InitController(PCONTROLLER_INFO ControllerInfo) PAGED_CODE(); ASSERT(ControllerInfo); - DPRINT("floppy: InitController called with Controller 0x%x\n", ControllerInfo); + DPRINT("floppy: InitController called with Controller 0x%p\n", ControllerInfo); KeClearEvent(&ControllerInfo->SynchEvent); @@ -785,7 +785,7 @@ static NTSTATUS NTAPI InitController(PCONTROLLER_INFO ControllerInfo) */ for(i = 0; i < ControllerInfo->NumberOfDrives; i++) { - DPRINT("floppy: InitController: recalibrating drive 0x%x on controller 0x%x\n", i, ControllerInfo); + DPRINT("floppy: InitController: recalibrating drive 0x%x on controller 0x%p\n", i, ControllerInfo); Recalibrate(&ControllerInfo->DriveInfo[i]); } @@ -849,7 +849,7 @@ static BOOLEAN NTAPI AddControllers(PDRIVER_OBJECT DriverObject) /* Must set up the DPC before we connect the interrupt */ KeInitializeDpc(&gControllerInfo[i].Dpc, DpcForIsr, &gControllerInfo[i]); - DPRINT("floppy: Connecting interrupt %d to controller%d (object 0x%x)\n", gControllerInfo[i].MappedVector, + DPRINT("floppy: Connecting interrupt %d to controller%d (object 0x%p)\n", gControllerInfo[i].MappedVector, i, &gControllerInfo[i]); /* NOTE: We cannot share our interrupt, even on level-triggered buses. See Isr() for details. */ @@ -916,8 +916,10 @@ static BOOLEAN NTAPI AddControllers(PDRIVER_OBJECT DriverObject) * 14: 3,2 * 15: 3,3 */ + DriveNumber = (UCHAR)(i*4 + j); /* loss of precision is OK; there are only 16 of 'em */ + RtlZeroMemory(&DeviceNameBuf, MAX_DEVICE_NAME * sizeof(WCHAR)); swprintf(DeviceNameBuf, L"\\Device\\Floppy%d", DriveNumber); RtlInitUnicodeString(&DeviceName, DeviceNameBuf); @@ -930,7 +932,7 @@ static BOOLEAN NTAPI AddControllers(PDRIVER_OBJECT DriverObject) continue; /* continue on to next drive */ } - DPRINT("floppy: AddControllers: New device: %S (0x%x)\n", DeviceNameBuf, gControllerInfo[i].DriveInfo[j].DeviceObject); + DPRINT("floppy: AddControllers: New device: %S (0x%p)\n", DeviceNameBuf, gControllerInfo[i].DriveInfo[j].DeviceObject); /* 3b.5: Create an ARC path in case we're booting from this drive */ swprintf(gControllerInfo[i].DriveInfo[j].ArcPathBuffer, diff --git a/reactos/drivers/storage/floppy/hardware.c b/reactos/drivers/storage/floppy/hardware.c index 6722ab59b67..7f95aec0087 100644 --- a/reactos/drivers/storage/floppy/hardware.c +++ b/reactos/drivers/storage/floppy/hardware.c @@ -1057,7 +1057,7 @@ NTSTATUS NTAPI HwPowerOff(PCONTROLLER_INFO ControllerInfo) * - Wake up with a hardware reset */ { - DPRINT("floppy: HwPowerOff called on controller 0x%x\n", ControllerInfo); + DPRINT("floppy: HwPowerOff called on controller 0x%p\n", ControllerInfo); WRITE_PORT_UCHAR(ControllerInfo->BaseAddress + DATA_RATE_SELECT_REGISTER, DRSR_POWER_DOWN); diff --git a/reactos/drivers/storage/floppy/readwrite.c b/reactos/drivers/storage/floppy/readwrite.c index 47b1f45361d..8f285b99d07 100644 --- a/reactos/drivers/storage/floppy/readwrite.c +++ b/reactos/drivers/storage/floppy/readwrite.c @@ -291,7 +291,7 @@ static NTSTATUS NTAPI RWSeekToCylinder(PDRIVE_INFO DriveInfo, PAGED_CODE(); - DPRINT("floppy: RWSeekToCylinder called drive 0x%x cylinder %d\n", DriveInfo, Cylinder); + DPRINT("floppy: RWSeekToCylinder called drive 0x%p cylinder %d\n", DriveInfo, Cylinder); /* Clear any spurious interrupts */ KeClearEvent(&DriveInfo->ControllerInfo->SynchEvent);