diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-05-09 11:42:03 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-05-18 14:38:45 +0200 |
commit | 2860e3eb9695d7596507e82b98074937fbd7fa18 (patch) | |
tree | ac687f284d48e1de058ac383d09bc82fd87504a2 /hw/ide | |
parent | 1e71db3087ae9256fcfd8e9e322ad86edce48a96 (diff) |
ide: Turn debug messages into assertions
These printfs aren't really debug messages, but clearly indicate a bug if they
ever become effective. Noone uses DEBUG_IDE, let's re-enable the check
unconditionally and make it an assertion instead of printfs in the device
emulation.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'hw/ide')
-rw-r--r-- | hw/ide/pci.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/ide/pci.c b/hw/ide/pci.c index f5ac93242e..a4726adbea 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -296,12 +296,8 @@ void bmdma_cmd_writeb(void *opaque, uint32_t addr, uint32_t val) */ if (bm->bus->dma->aiocb) { qemu_aio_flush(); -#ifdef DEBUG_IDE - if (bm->bus->dma->aiocb) - printf("ide_dma_cancel: aiocb still pending\n"); - if (bm->status & BM_STATUS_DMAING) - printf("ide_dma_cancel: BM_STATUS_DMAING still pending\n"); -#endif + assert(bm->bus->dma->aiocb == NULL); + assert((bm->status & BM_STATUS_DMAING) == 0); } } else { bm->cur_addr = bm->addr; |