[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/15] raw-posix: Use DPRINTF for DEBUG_FLOPPY
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 11/15] raw-posix: Use DPRINTF for DEBUG_FLOPPY |
Date: |
Wed, 24 Jun 2015 16:28:02 +0100 |
From: Dimitris Aragiorgis <address@hidden>
Get rid of several #ifdef DEBUG_FLOPPY and substitute them with
DPRINTF.
Signed-off-by: Dimitris Aragiorgis <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block/raw-posix.c | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 23c4577..57a243f 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -96,8 +96,6 @@
#include <xfs/xfs.h>
#endif
-//#define DEBUG_FLOPPY
-
//#define DEBUG_BLOCK
#ifdef DEBUG_BLOCK
@@ -2172,16 +2170,12 @@ static int fd_open(BlockDriverState *bs)
(qemu_clock_get_ns(QEMU_CLOCK_REALTIME) - s->fd_open_time) >=
FD_OPEN_TIMEOUT) {
qemu_close(s->fd);
s->fd = -1;
-#ifdef DEBUG_FLOPPY
- printf("Floppy closed\n");
-#endif
+ DPRINTF("Floppy closed\n");
}
if (s->fd < 0) {
if (s->fd_got_error &&
(qemu_clock_get_ns(QEMU_CLOCK_REALTIME) - s->fd_error_time) <
FD_OPEN_TIMEOUT) {
-#ifdef DEBUG_FLOPPY
- printf("No floppy (open delayed)\n");
-#endif
+ DPRINTF("No floppy (open delayed)\n");
return -EIO;
}
s->fd = qemu_open(bs->filename, s->open_flags & ~O_NONBLOCK);
@@ -2190,14 +2184,10 @@ static int fd_open(BlockDriverState *bs)
s->fd_got_error = 1;
if (last_media_present)
s->fd_media_changed = 1;
-#ifdef DEBUG_FLOPPY
- printf("No floppy\n");
-#endif
+ DPRINTF("No floppy\n");
return -EIO;
}
-#ifdef DEBUG_FLOPPY
- printf("Floppy opened\n");
-#endif
+ DPRINTF("Floppy opened\n");
}
if (!last_media_present)
s->fd_media_changed = 1;
@@ -2465,9 +2455,7 @@ static int floppy_media_changed(BlockDriverState *bs)
fd_open(bs);
ret = s->fd_media_changed;
s->fd_media_changed = 0;
-#ifdef DEBUG_FLOPPY
- printf("Floppy changed=%d\n", ret);
-#endif
+ DPRINTF("Floppy changed=%d\n", ret);
return ret;
}
--
2.4.3
- [Qemu-devel] [PULL 02/15] throttle: Check current timers before updating any_timer_armed[], (continued)
- [Qemu-devel] [PULL 02/15] throttle: Check current timers before updating any_timer_armed[], Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 01/15] block: Let bdrv_drain_all() to call aio_poll() for each AioContext, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 03/15] block-backend: Introduce blk_drain(), Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 04/15] virtio-blk: Use blk_drain() to drain IO requests, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 05/15] util/hbitmap: Add an API to reset all set bits in hbitmap, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 07/15] nvme: Fix memleak in nvme_dma_read_prp, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 06/15] vvfat: add a label option, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 08/15] block: Use bdrv_is_sg() everywhere, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 09/15] Fix migration in case of scsi-generic, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 10/15] raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 11/15] raw-posix: Use DPRINTF for DEBUG_FLOPPY,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 13/15] iov: don't touch iov in iov_send_recv(), Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 12/15] raw-posix: Introduce hdev_is_sg(), Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 14/15] qemu-iotests: fix 051.out after qdev error message change, Stefan Hajnoczi, 2015/06/24
- [Qemu-devel] [PULL 15/15] virito-blk: drop duplicate check, Stefan Hajnoczi, 2015/06/24
- Re: [Qemu-devel] [PULL 00/15] Block patches, Peter Maydell, 2015/06/25