diff mbox

sd: Send debug printfery to stderr not stdout

Message ID 1352961173-16498-1-git-send-email-peter.crosthwaite@xilinx.com
State New
Headers show

Commit Message

Peter Crosthwaite Nov. 15, 2012, 6:32 a.m. UTC
Some debug printfs for SD are coming up in stdout. Redirected them to stderr
instead.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
 hw/sd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Peter Maydell Nov. 15, 2012, 8:52 a.m. UTC | #1
On 15 November 2012 06:32, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> 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>

(the patched section is inside an #ifdef DEBUG_SD guard, so
it's ok to be doing fprintf()s here.)

-- PMM
Stefan Hajnoczi Nov. 16, 2012, 1:53 p.m. UTC | #2
On Thu, Nov 15, 2012 at 04:32:53PM +1000, Peter Crosthwaite wrote:
> Some debug printfs for SD are coming up in stdout. Redirected them to stderr
> instead.
> 
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> ---
>  hw/sd.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan
diff mbox

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);
     }