diff options
author | Dimitris Aragiorgis <dimara@arrikto.com> | 2015-06-23 13:44:59 +0300 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-06-23 15:08:52 +0100 |
commit | a93a3982a6645463fa822131d38b17284edd5633 (patch) | |
tree | 834ef68572aaeab6bfc39e2f422a55d9e86a4252 /block/raw-posix.c | |
parent | bcb225550dcc0d6fcef8e97012bae572ba78f73a (diff) | |
download | qemu-a93a3982a6645463fa822131d38b17284edd5633.zip qemu-a93a3982a6645463fa822131d38b17284edd5633.tar.gz qemu-a93a3982a6645463fa822131d38b17284edd5633.tar.bz2 |
raw-posix: Use DPRINTF for DEBUG_FLOPPY
Get rid of several #ifdef DEBUG_FLOPPY and substitute them with
DPRINTF.
Signed-off-by: Dimitris Aragiorgis <dimara@arrikto.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1435056300-14924-5-git-send-email-dimara@arrikto.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/raw-posix.c')
-rw-r--r-- | block/raw-posix.c | 22 |
1 files 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; } |