forked from Dniel97/segatools
Make dprintfs 64-bit clean
This commit is contained in:
parent
755be05603
commit
ee011a74d4
@ -41,7 +41,7 @@ static HRESULT sg_req_validate(const void *ptr, size_t nbytes)
|
||||
if (req->hdr.frame_len != nbytes) {
|
||||
dprintf("SG Cmd: Frame length mismatch: got %i exp %i\n",
|
||||
req->hdr.frame_len,
|
||||
nbytes);
|
||||
(int) nbytes);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
@ -51,7 +51,7 @@ static HRESULT sg_req_validate(const void *ptr, size_t nbytes)
|
||||
if (req->payload_len != payload_len) {
|
||||
dprintf("SG Cmd: Payload length mismatch: got %i exp %i\n",
|
||||
req->payload_len,
|
||||
payload_len);
|
||||
(int) payload_len);
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ static HRESULT com12_mifare_poll(void *ctx, uint32_t *uid)
|
||||
r = fscanf(f, "%02x ", &byte);
|
||||
|
||||
if (r != 1) {
|
||||
dprintf("Aime reader: fscanf[%i] failed: %i\n", i, r);
|
||||
dprintf("Aime reader: fscanf[%i] failed: %i\n", (int) i, r);
|
||||
|
||||
goto end;
|
||||
}
|
||||
|
6
nu/ds.c
6
nu/ds.c
@ -159,10 +159,10 @@ static HRESULT ds_handle_ioctl(struct irp *irp)
|
||||
return ds_ioctl_read_sector(irp);
|
||||
|
||||
default:
|
||||
dprintf("DS: Unknown ioctl %x, write %i read %i\n",
|
||||
dprintf("DS: Unknown ioctl %08x, write %i read %i\n",
|
||||
irp->ioctl,
|
||||
irp->write.nbytes,
|
||||
irp->read.nbytes);
|
||||
(int) irp->write.nbytes,
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
return HRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION);
|
||||
}
|
||||
|
@ -100,8 +100,8 @@ static HRESULT eeprom_handle_ioctl(struct irp *irp)
|
||||
default:
|
||||
dprintf("EEPROM: Unknown ioctl %x, write %i read %i\n",
|
||||
irp->ioctl,
|
||||
irp->write.nbytes,
|
||||
irp->read.nbytes);
|
||||
(int) irp->write.nbytes,
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
return HRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION);
|
||||
}
|
||||
@ -143,7 +143,7 @@ static HRESULT eeprom_handle_read(struct irp *irp)
|
||||
|
||||
dprintf("EEPROM: Read off %x len %x\n",
|
||||
(int) irp->ovl->Offset,
|
||||
irp->read.nbytes);
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
return iohook_invoke_next(irp);
|
||||
}
|
||||
@ -158,7 +158,7 @@ static HRESULT eeprom_handle_write(struct irp *irp)
|
||||
|
||||
dprintf("EEPROM: Write off %x len %x\n",
|
||||
(int) irp->ovl->Offset,
|
||||
irp->write.nbytes);
|
||||
(int) irp->write.nbytes);
|
||||
|
||||
return iohook_invoke_next(irp);
|
||||
}
|
||||
|
@ -131,10 +131,10 @@ static HRESULT gpio_handle_ioctl(struct irp *irp)
|
||||
return gpio_ioctl_describe(irp);
|
||||
|
||||
default:
|
||||
dprintf("GPIO: IOCTL %08x write %i read %i\n",
|
||||
dprintf("GPIO: Unknown ioctl %08x, write %i read %i\n",
|
||||
irp->ioctl,
|
||||
irp->write.nbytes,
|
||||
irp->read.nbytes);
|
||||
(int) irp->write.nbytes,
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
return HRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION);
|
||||
}
|
||||
|
@ -70,10 +70,10 @@ static HRESULT hwmon_handle_ioctl(struct irp *irp)
|
||||
return hwmon_ioctl_read_cpu_temp(irp);
|
||||
|
||||
default:
|
||||
dprintf("Hwmon: Unknown ioctl %08x write %i read %i\n",
|
||||
dprintf("Hwmon: Unknown ioctl %08x, write %i read %i\n",
|
||||
irp->ioctl,
|
||||
irp->write.nbytes,
|
||||
irp->read.nbytes);
|
||||
(int) irp->write.nbytes,
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
return HRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION);
|
||||
}
|
||||
|
32
nu/nusec.c
32
nu/nusec.c
@ -151,10 +151,10 @@ static HRESULT nusec_handle_ioctl(struct irp *irp)
|
||||
return nusec_ioctl_put_trace_log_data(irp);
|
||||
|
||||
default:
|
||||
dprintf("Security: Unhandled ioctl %#08x: read %i write %i\n",
|
||||
dprintf("Security: Unknown ioctl %#08x, write %i read %i\n",
|
||||
irp->ioctl,
|
||||
irp->read.nbytes,
|
||||
irp->write.nbytes);
|
||||
(int) irp->write.nbytes,
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
return HRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION);
|
||||
}
|
||||
@ -241,9 +241,17 @@ static HRESULT nusec_ioctl_get_billing_ca_cert(struct irp *irp)
|
||||
irp->op = IRP_OP_READ;
|
||||
irp->fd = fd;
|
||||
|
||||
dprintf(">>> %p:%i/%i\n", irp->read.bytes, irp->read.pos, irp->read.nbytes);
|
||||
dprintf(">>> %p:%i/%i\n",
|
||||
irp->read.bytes,
|
||||
(int) irp->read.pos,
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
hr = iohook_invoke_next(irp);
|
||||
dprintf("<<< %p:%i/%i\n", irp->read.bytes, irp->read.pos, irp->read.nbytes);
|
||||
|
||||
dprintf("<<< %p:%i/%i\n",
|
||||
irp->read.bytes,
|
||||
(int) irp->read.pos,
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
dprintf("ReadFile transformation failed: %x\n", (int) hr);
|
||||
@ -280,9 +288,17 @@ static HRESULT nusec_ioctl_get_billing_pubkey(struct irp *irp)
|
||||
irp->op = IRP_OP_READ;
|
||||
irp->fd = fd;
|
||||
|
||||
dprintf(">>> %p:%i/%i\n", irp->read.bytes, irp->read.pos, irp->read.nbytes);
|
||||
dprintf(">>> %p:%i/%i\n",
|
||||
irp->read.bytes,
|
||||
(int) irp->read.pos,
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
hr = iohook_invoke_next(irp);
|
||||
dprintf("<<< %p:%i/%i\n", irp->read.bytes, irp->read.pos, irp->read.nbytes);
|
||||
|
||||
dprintf("<<< %p:%i/%i\n",
|
||||
irp->read.bytes,
|
||||
(int) irp->read.pos,
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
dprintf("ReadFile transformation failed: %x\n", (int) hr);
|
||||
@ -362,7 +378,7 @@ static HRESULT nusec_ioctl_get_trace_log_data(struct irp *irp)
|
||||
return hr;
|
||||
}
|
||||
|
||||
dprintf(" Params: %i %i Buf: %i\n", pos, count, irp->read.nbytes);
|
||||
dprintf(" Params: %i %i Buf: %i\n", pos, count, (int) irp->read.nbytes);
|
||||
|
||||
avail = irp->read.nbytes - irp->read.pos;
|
||||
|
||||
|
@ -96,8 +96,8 @@ static HRESULT sram_handle_ioctl(struct irp *irp)
|
||||
default:
|
||||
dprintf("SRAM: Unknown ioctl %x, write %i read %i\n",
|
||||
irp->ioctl,
|
||||
irp->write.nbytes,
|
||||
irp->read.nbytes);
|
||||
(int) irp->write.nbytes,
|
||||
(int) irp->read.nbytes);
|
||||
|
||||
return HRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ void dump(const void *ptr, size_t nbytes)
|
||||
bytes = ptr;
|
||||
|
||||
for (i = 0 ; i < nbytes ; i += 16) {
|
||||
dprintf(" %08x:", i);
|
||||
dprintf(" %08x:", (int) i);
|
||||
|
||||
for (j = 0 ; i + j < nbytes && j < 16 ; j++) {
|
||||
dprintf(" %02x", bytes[i + j]);
|
||||
|
Loading…
Reference in New Issue
Block a user