]> Git Repo - qemu.git/commitdiff
sdcard: replace fprintf() by qemu_hexdump()
authorPhilippe Mathieu-Daudé <[email protected]>
Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)
committerPeter Maydell <[email protected]>
Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215220540[email protected]
Signed-off-by: Peter Maydell <[email protected]>
hw/sd/sd.c

index 8f72cde534652ed56fbad0446afce4c332704151..ceab263970ab1495b3e5fa321b7ed0bf5aafcf8d 100644 (file)
 
 //#define DEBUG_SD 1
 
-#ifdef DEBUG_SD
-#define DPRINTF(fmt, ...) \
-do { fprintf(stderr, "SD: " fmt , ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...) do {} while(0)
-#endif
-
 #define ACMD41_ENQUIRY_MASK     0x00ffffff
 #define OCR_POWER_UP            0x80000000
 #define OCR_POWER_DELAY_NS      500000 /* 0.5ms */
@@ -1632,14 +1625,7 @@ send_response:
     }
 
 #ifdef DEBUG_SD
-    if (rsplen) {
-        int i;
-        DPRINTF("Response:");
-        for (i = 0; i < rsplen; i++) {
-            DPRINTF(" %02x", response[i]);
-        }
-        DPRINTF(" state %d\n", sd->state);
-    }
+    qemu_hexdump((const char *)response, stderr, "Response", rsplen);
 #endif
 
     return rsplen;
This page took 0.030274 seconds and 4 git commands to generate.