pflash_cfi0x: Send debug messages to stderr

These debug info messages should go to stderr rather than stdout.

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>
This commit is contained in:
Peter Crosthwaite 2012-12-04 16:04:34 +10:00 committed by Stefan Hajnoczi
parent d96fc51cc6
commit ec9ea4890c
2 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

@ -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)