Patchwork [2/2] sd: Send debug printfery to stderr not stdout

login
register
mail settings
Submitter Stefan Hajnoczi
Date Nov. 16, 2012, 2:08 p.m.
Message ID <1353074895-3712-3-git-send-email-stefanha@redhat.com>
Download mbox | patch
Permalink /patch/199626/
State New
Headers show

Comments

Stefan Hajnoczi - Nov. 16, 2012, 2:08 p.m.
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Some debug printfs for SD are coming up in stdout. Redirected them to stderr
instead.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/sd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/sd.c b/hw/sd.c
index 3c34d43..607edba 100644
--- a/hw/sd.c
+++ b/hw/sd.c
@@ -1439,8 +1439,8 @@  send_response:
         int i;
         DPRINTF("Response:");
         for (i = 0; i < rsplen; i++)
-            printf(" %02x", response[i]);
-        printf(" state %d\n", sd->state);
+            fprintf(stderr, " %02x", response[i]);
+        fprintf(stderr, " state %d\n", sd->state);
     } else {
         DPRINTF("No response %d\n", sd->state);
     }