Skip to content

Commit

Permalink
pflash_cfi0x: Send debug messages to stderr
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pete128 authored and stefanhaRH committed Dec 18, 2012
1 parent d96fc51 commit ec9ea48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions hw/pflash_cfi01.c
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions hw/pflash_cfi02.c
Expand Up @@ -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)
Expand Down

0 comments on commit ec9ea48

Please sign in to comment.