static uint32_t cdrom_capacity(void * private_data) {
struct cdrom_state * cdrom = (struct cdrom_state *)private_data;
- PrintDebug("[cdrom_capacity] s_ramdiskSize = %d\n", cdrom->capacity_in_bytes);
+ PrintDebug("[cdrom_capacity] s_ramdiskSize = %lu\n", cdrom->capacity_in_bytes);
if (cdrom->lba) {
if (cdrom->capacity_in_bytes % 2048) {
- PrintDebug("\t\t capacity in LBA is %d\n", (cdrom->capacity_in_bytes / 2048) + 1);
+ PrintDebug("\t\t capacity in LBA is %lu\n", (cdrom->capacity_in_bytes / 2048) + 1);
return (cdrom->capacity_in_bytes / 2048) + 1;
} else {
- PrintDebug("\t\t capacity in LBA is %d\n", cdrom->capacity_in_bytes / 2048);
+ PrintDebug("\t\t capacity in LBA is %lu\n", cdrom->capacity_in_bytes / 2048);
return cdrom->capacity_in_bytes / 2048;
}
} else {
V3_ASSERT(lba != 0);
- PrintDebug("[cdrom_read_block] lba = %d (cdrom_image_start=%x)\n", lba, cdrom->image_addr);
+ PrintDebug("[cdrom_read_block] lba = %d (cdrom_image_start=%p)\n", lba, (void*)cdrom->image_addr);
memcpy(buf, (uchar_t *)(cdrom->image_addr + lba * 2048), 2048);
//PrintDebug("Returning from read block\n");
return;
static int cdrom_device_init(struct vm_device * dev) {
struct cdrom_state * cdrom = (struct cdrom_state *)dev->private_data;
PrintDebug("[cdrom_init]\n");
- PrintDebug("CDIMAGE located at: %x\n", cdrom->image_addr);
+ PrintDebug("CDIMAGE located at: %p\n", (void *)cdrom->image_addr);
//FIXME:lba
cdrom->lba = 1;
list_for_each_entry(tmp, &(state->port_list), range_link) {
uint_t i = 0;
- PrintDebug("generic: hooking ports 0x%x to 0x%x as %x\n",
+ PrintDebug("generic: hooking ports 0x%x to 0x%x as %s\n",
tmp->start, tmp->end,
(tmp->type == GENERIC_PRINT_AND_PASSTHROUGH) ? "print-and-passthrough" : "print-and-ignore");
list_for_each_entry(tmp, &(state->mem_list), range_link) {
- PrintDebug("generic: hooking addresses 0x%x to 0x%x\n",
+ PrintDebug("generic: hooking addresses 0x%p to 0x%p\n",
tmp->start, tmp->end);
if (v3_dev_hook_mem(dev, tmp->start, tmp->end)) {
- PrintDebug("generic: Can't hook addresses 0x%x to 0x%x (already hooked?)\n",
+ PrintDebug("generic: Can't hook addresses 0x%p to 0x%p (already hooked?)\n",
tmp->start, tmp->end);
}
}
list_for_each_entry_safe(cur, tmp, &(state->mem_list), range_link) {
- PrintDebug("generic: unhooking addresses 0x%x to 0x%x\n",
+ PrintDebug("generic: unhooking addresses 0x%p to 0x%p\n",
cur->start, cur->end);
if (v3_dev_unhook_mem(dev, cur->start, cur->end)) {
- PrintDebug("generic: Can't unhook addresses 0x%x to 0x%x (already unhooked?)\n",
+ PrintDebug("generic: Can't unhook addresses 0x%p to 0x%p (already unhooked?)\n",
cur->start, cur->end);
}
range->type = type;
- PrintDebug("generic: Adding Port Range: 0x%x to 0x%x as %x\n",
+ PrintDebug("generic: Adding Port Range: 0x%x to 0x%x as %s\n",
range->start, range->end,
(range->type == GENERIC_PRINT_AND_PASSTHROUGH) ? "print-and-passthrough" : "print-and-ignore");
memset((char *)(channels + channel), 0, sizeof(struct channel_t));
}
*/
- PrintDebug("sizeof(*channels) = %d\n", sizeof(*channels));
- PrintDebug("sizeof(channles->drives[0].controller) = %d\n", sizeof((channels->drives[0].controller)));
- PrintDebug("sizeof(channles->drives[0].cdrom) = %d\n", sizeof((channels->drives[0].cdrom)));
- PrintDebug("sizeof(channles->drives[0].sense) = %d\n", sizeof((channels->drives[0].sense)));
- PrintDebug("sizeof(channles->drives[0].atapi) = %d\n", sizeof((channels->drives[0].atapi)));
- PrintDebug("sizeof(channles->drives[0].controller.status) = %d\n",
- sizeof((channels->drives[0].controller.status)));
- PrintDebug("sizeof(channles->drives[0].controller.sector_count) = %d\n",
- sizeof((channels->drives[0].controller.sector_count)));
- PrintDebug("sizeof(channles->drives[0].controller.interrupt_reason) = %d\n",
- sizeof((channels->drives[0].controller.interrupt_reason)));
-
- PrintDebug("sizeof(channles->drives[0].controller.cylinder_no) = %d\n",
- sizeof((channels->drives[0].controller.cylinder_no)));
- PrintDebug("sizeof(channles->drives[0].controller.byte_count) = %d\n",
- sizeof((channels->drives[0].controller.byte_count)));
-
-
- PrintDebug("sizeof(channles->drives[0].controller.control) = %d\n",
- sizeof((channels->drives[0].controller.control)));
-
for (channel = 0; channel < MAX_ATA_CHANNEL; channel++){