diff options
author | Alistair Francis | 2017-08-18 20:47:35 +0200 |
---|---|---|
committer | Paolo Bonzini | 2017-09-19 16:20:49 +0200 |
commit | 05cb8ed5467ff0f154f9356fa0cdcf7fca4b17f6 (patch) | |
tree | f9fea54fedaf767ed92003481d6bb36e14da1495 /util | |
parent | Makefile: Remove libqemustub.a (diff) | |
download | qemu-05cb8ed5467ff0f154f9356fa0cdcf7fca4b17f6.tar.gz qemu-05cb8ed5467ff0f154f9356fa0cdcf7fca4b17f6.tar.xz qemu-05cb8ed5467ff0f154f9356fa0cdcf7fca4b17f6.zip |
Convert remaining single line fprintf() to warn_report()
Convert any remaining uses of fprintf(stderr, "warning:"...
to use warn_report() instead. This helps standardise on a single
method of printing warnings to the user.
All of the warnings were changed using this command:
find ./* -type f -exec sed -i 's|fprintf(.*".*warning[,:] |warn_report("|Ig' {} +
The #include lines and chagnes to the test Makefile were manually
updated to allow the code to compile.
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Message-Id: <2c94ac3bb116cc6b8ebbcd66a254920a69665515.1503077821.git.alistair.francis@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/cutils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/cutils.c b/util/cutils.c index 1534682083..b33ede83d1 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -30,6 +30,7 @@ #include "qemu/iov.h" #include "net/net.h" #include "qemu/cutils.h" +#include "qemu/error-report.h" void strpadcpy(char *buf, int buf_size, const char *str, char pad) { @@ -601,7 +602,7 @@ int parse_debug_env(const char *name, int max, int initial) return initial; } if (debug < 0 || debug > max || errno != 0) { - fprintf(stderr, "warning: %s not in [0, %d]", name, max); + warn_report("%s not in [0, %d]", name, max); return initial; } return debug; |