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 authored and Stefan Hajnoczi committed 2012-12-18 16:49:51 +01:00
1 parent d96fc51cc6
commit ec9ea4890c
2 files changed
+7 -7

No files matched your search

+4 -4
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)
+3 -3
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)