mvadkert / rpms / qemu

Forked from rpms/qemu 6 years ago
Clone
5544c1b
From c03bf619fe8eb416aaea1f8b75b313a4b314ffeb Mon Sep 17 00:00:00 2001
5544c1b
From: "Peter A. G. Crosthwaite" <peter.crosthwaite@petalogix.com>
5544c1b
Date: Thu, 28 Jun 2012 16:28:03 +1000
5544c1b
Subject: [PATCH] xilinx_timer: Send dbg msgs to stderr not stdout
5544c1b
5544c1b
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
5544c1b
(cherry picked from commit e03377ae75808d33d0a7afc803b37bcda9f796b3)
5544c1b
5544c1b
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1b
---
5544c1b
 hw/xilinx_timer.c | 8 ++++----
5544c1b
 1 file changed, 4 insertions(+), 4 deletions(-)
5544c1b
5544c1b
diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c
5544c1b
index 053ba02..c02e6ca 100644
5544c1b
--- a/hw/xilinx_timer.c
5544c1b
+++ b/hw/xilinx_timer.c
5544c1b
@@ -119,7 +119,7 @@ timer_read(void *opaque, target_phys_addr_t addr, unsigned int size)
5544c1b
             break;
5544c1b
 
5544c1b
     }
5544c1b
-    D(printf("%s timer=%d %x=%x\n", __func__, timer, addr * 4, r));
5544c1b
+    D(fprintf(stderr, "%s timer=%d %x=%x\n", __func__, timer, addr * 4, r));
5544c1b
     return r;
5544c1b
 }
5544c1b
 
5544c1b
@@ -127,7 +127,7 @@ static void timer_enable(struct xlx_timer *xt)
5544c1b
 {
5544c1b
     uint64_t count;
5544c1b
 
5544c1b
-    D(printf("%s timer=%d down=%d\n", __func__,
5544c1b
+    D(fprintf(stderr, "%s timer=%d down=%d\n", __func__,
5544c1b
               xt->nr, xt->regs[R_TCSR] & TCSR_UDT));
5544c1b
 
5544c1b
     ptimer_stop(xt->ptimer);
5544c1b
@@ -152,7 +152,7 @@ timer_write(void *opaque, target_phys_addr_t addr,
5544c1b
     addr >>= 2;
5544c1b
     timer = timer_from_addr(addr);
5544c1b
     xt = &t->timers[timer];
5544c1b
-    D(printf("%s addr=%x val=%x (timer=%d off=%d)\n",
5544c1b
+    D(fprintf(stderr, "%s addr=%x val=%x (timer=%d off=%d)\n",
5544c1b
              __func__, addr * 4, value, timer, addr & 3));
5544c1b
     /* Further decoding to address a specific timers reg.  */
5544c1b
     addr &= 3;
5544c1b
@@ -189,7 +189,7 @@ static void timer_hit(void *opaque)
5544c1b
 {
5544c1b
     struct xlx_timer *xt = opaque;
5544c1b
     struct timerblock *t = xt->parent;
5544c1b
-    D(printf("%s %d\n", __func__, timer));
5544c1b
+    D(fprintf(stderr, "%s %d\n", __func__, timer));
5544c1b
     xt->regs[R_TCSR] |= TCSR_TINT;
5544c1b
 
5544c1b
     if (xt->regs[R_TCSR] & TCSR_ARHT)
5544c1b
-- 
5544c1b
1.7.12.1
5544c1b