From ec9ea4890cd06de1648cbbfb99fcb63e01f4000f Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Tue, 4 Dec 2012 16:04:34 +1000 Subject: pflash_cfi0x: Send debug messages to stderr These debug info messages should go to stderr rather than stdout. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- hw/pflash_cfi01.c | 8 ++++---- hw/pflash_cfi02.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'hw') diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index f9f8e5d03c..931264ff8c 100644 --- a/hw/pflash_cfi01.c +++ b/hw/pflash_cfi01.c @@ -46,15 +46,15 @@ #define PFLASH_BUG(fmt, ...) \ do { \ - printf("PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \ + fprintf(stderr, "PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \ exit(1); \ } while(0) /* #define PFLASH_DEBUG */ #ifdef PFLASH_DEBUG -#define DPRINTF(fmt, ...) \ -do { \ - printf("PFLASH: " fmt , ## __VA_ARGS__); \ +#define DPRINTF(fmt, ...) \ +do { \ + fprintf(stderr, "PFLASH: " fmt , ## __VA_ARGS__); \ } while (0) #else #define DPRINTF(fmt, ...) do { } while (0) diff --git a/hw/pflash_cfi02.c b/hw/pflash_cfi02.c index f918e36580..c60ae831b4 100644 --- a/hw/pflash_cfi02.c +++ b/hw/pflash_cfi02.c @@ -45,9 +45,9 @@ //#define PFLASH_DEBUG #ifdef PFLASH_DEBUG -#define DPRINTF(fmt, ...) \ -do { \ - printf("PFLASH: " fmt , ## __VA_ARGS__); \ +#define DPRINTF(fmt, ...) \ +do { \ + fprintf(stderr "PFLASH: " fmt , ## __VA_ARGS__); \ } while (0) #else #define DPRINTF(fmt, ...) do { } while (0) -- cgit v1.2.3