aboutsummaryrefslogtreecommitdiff
path: root/vl.c
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 /vl.c
parent9176e8fb8f78206bd4039f001aca0d931a47d663 (diff)
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 'vl.c')
-rw-r--r--vl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/vl.c b/vl.c
index f422a1cae4..1c283c9fce 100644
--- a/vl.c
+++ b/vl.c
@@ -2393,7 +2393,7 @@ static int chardev_init_func(QemuOpts *opts, void *opaque)
qemu_chr_new_from_opts(opts, NULL, &local_err);
if (error_is_set(&local_err)) {
- fprintf(stderr, "%s\n", error_get_pretty(local_err));
+ error_report("%s", error_get_pretty(local_err));
error_free(local_err);
return -1;
}
@@ -4375,8 +4375,8 @@ int main(int argc, char **argv, char **envp)
vnc_display_init(ds);
vnc_display_open(ds, vnc_display, &local_err);
if (local_err != NULL) {
- fprintf(stderr, "Failed to start VNC server on `%s': %s\n",
- vnc_display, error_get_pretty(local_err));
+ error_report("Failed to start VNC server on `%s': %s",
+ vnc_display, error_get_pretty(local_err));
error_free(local_err);
exit(1);
}
@@ -4419,7 +4419,8 @@ int main(int argc, char **argv, char **envp)
Error *local_err = NULL;
qemu_start_incoming_migration(incoming, &local_err);
if (local_err) {
- fprintf(stderr, "-incoming %s: %s\n", incoming, error_get_pretty(local_err));
+ error_report("-incoming %s: %s", incoming,
+ error_get_pretty(local_err));
error_free(local_err);
exit(1);
}