提交 ec9ea489 编写于 作者: P Peter Crosthwaite 提交者: Stefan Hajnoczi

pflash_cfi0x: Send debug messages to stderr

These debug info messages should go to stderr rather than stdout.
Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 d96fc51c
...@@ -46,15 +46,15 @@ ...@@ -46,15 +46,15 @@
#define PFLASH_BUG(fmt, ...) \ #define PFLASH_BUG(fmt, ...) \
do { \ do { \
printf("PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \ fprintf(stderr, "PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \
exit(1); \ exit(1); \
} while(0) } while(0)
/* #define PFLASH_DEBUG */ /* #define PFLASH_DEBUG */
#ifdef PFLASH_DEBUG #ifdef PFLASH_DEBUG
#define DPRINTF(fmt, ...) \ #define DPRINTF(fmt, ...) \
do { \ do { \
printf("PFLASH: " fmt , ## __VA_ARGS__); \ fprintf(stderr, "PFLASH: " fmt , ## __VA_ARGS__); \
} while (0) } while (0)
#else #else
#define DPRINTF(fmt, ...) do { } while (0) #define DPRINTF(fmt, ...) do { } while (0)
......
...@@ -45,9 +45,9 @@ ...@@ -45,9 +45,9 @@
//#define PFLASH_DEBUG //#define PFLASH_DEBUG
#ifdef PFLASH_DEBUG #ifdef PFLASH_DEBUG
#define DPRINTF(fmt, ...) \ #define DPRINTF(fmt, ...) \
do { \ do { \
printf("PFLASH: " fmt , ## __VA_ARGS__); \ fprintf(stderr "PFLASH: " fmt , ## __VA_ARGS__); \
} while (0) } while (0)
#else #else
#define DPRINTF(fmt, ...) do { } while (0) #define DPRINTF(fmt, ...) do { } while (0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册