summaryrefslogtreecommitdiff
path: root/hw/char
diff options
context:
space:
mode:
authorSeiji Aguchi <seiji.aguchi@hds.com>2013-08-05 15:40:44 -0400
committerLuiz Capitulino <lcapitulino@redhat.com>2013-08-20 11:51:59 -0400
commit4a44d85e28bd282f53ccf0fa933dd71b8744a229 (patch)
tree50836ead288ef58a3b217dfb9b8ec91004a9f23a /hw/char
parent9176e8fb8f78206bd4039f001aca0d931a47d663 (diff)
downloadqemu-4a44d85e28bd282f53ccf0fa933dd71b8744a229.tar.gz
Convert stderr message calling error_get_pretty() to error_report()
Convert stderr messages calling error_get_pretty() to error_report(). Timestamp is prepended by -msg timstamp option with it. Per Markus's comment below, A conversion from fprintf() to error_report() is always an improvement, regardless of error_get_pretty(). http://marc.info/?l=qemu-devel&m=137513283408601&w=2 But, it is not reasonable to convert them at one time because fprintf() is used everwhere in qemu. So, it should be done step by step with avoiding regression. Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/serial.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 602559254e..a31eb5756a 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -27,6 +27,7 @@
#include "sysemu/char.h"
#include "qemu/timer.h"
#include "exec/address-spaces.h"
+#include "qemu/error-report.h"
//#define DEBUG_SERIAL
@@ -696,7 +697,7 @@ SerialState *serial_init(int base, qemu_irq irq, int baudbase,
s->chr = chr;
serial_realize_core(s, &err);
if (err != NULL) {
- fprintf(stderr, "%s\n", error_get_pretty(err));
+ error_report("%s", error_get_pretty(err));
error_free(err);
exit(1);
}
@@ -760,7 +761,7 @@ SerialState *serial_mm_init(MemoryRegion *address_space,
serial_realize_core(s, &err);
if (err != NULL) {
- fprintf(stderr, "%s\n", error_get_pretty(err));
+ error_report("%s", error_get_pretty(err));
error_free(err);
exit(1);
}