Commit ec9ea489 authored by Peter Crosthwaite's avatar Peter Crosthwaite Committed by Stefan Hajnoczi
Browse files

pflash_cfi0x: Send debug messages to stderr



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

Signed-off-by: default avatarPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
parent d96fc51c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@

#define PFLASH_BUG(fmt, ...) \
do { \
    printf("PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \
    fprintf(stderr, "PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \
    exit(1); \
} while(0)

@@ -54,7 +54,7 @@ do { \
#ifdef PFLASH_DEBUG
#define DPRINTF(fmt, ...)                                   \
do {                                                        \
    printf("PFLASH: " fmt , ## __VA_ARGS__);       \
    fprintf(stderr, "PFLASH: " fmt , ## __VA_ARGS__);       \
} while (0)
#else
#define DPRINTF(fmt, ...) do { } while (0)
+3 −3
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@
#ifdef PFLASH_DEBUG
#define DPRINTF(fmt, ...)                                  \
do {                                                       \
    printf("PFLASH: " fmt , ## __VA_ARGS__);       \
    fprintf(stderr "PFLASH: " fmt , ## __VA_ARGS__);       \
} while (0)
#else
#define DPRINTF(fmt, ...) do { } while (0)