diff options
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 21 |
1 files changed, 8 insertions, 13 deletions
@@ -2137,8 +2137,7 @@ static int chardev_init_func(QemuOpts *opts, void *opaque) qemu_chr_new_from_opts(opts, NULL, &local_err); if (local_err) { - error_report("%s", error_get_pretty(local_err)); - error_free(local_err); + error_report_err(local_err); return -1; } return 0; @@ -2218,8 +2217,7 @@ static void monitor_parse(const char *optarg, const char *mode, bool pretty) opts = qemu_opts_create(qemu_find_opts("mon"), label, 1, &local_err); if (!opts) { - error_report("%s", error_get_pretty(local_err)); - error_free(local_err); + error_report_err(local_err); exit(1); } qemu_opt_set(opts, "mode", mode); @@ -2583,8 +2581,7 @@ static int machine_set_property(const char *name, const char *value, g_free(qom_name); if (local_err) { - qerror_report_err(local_err); - error_free(local_err); + error_report_err(local_err); return -1; } @@ -2637,8 +2634,7 @@ out: g_free(type); g_free(dummy); if (err) { - qerror_report_err(err); - error_free(err); + error_report_err(err); return -1; } return 0; @@ -3766,7 +3762,7 @@ int main(int argc, char **argv, char **envp) os_daemonize(); if (qemu_init_main_loop(&main_loop_err)) { - error_report("%s", error_get_pretty(main_loop_err)); + error_report_err(main_loop_err); exit(1); } @@ -4033,8 +4029,7 @@ int main(int argc, char **argv, char **envp) Error *local_err = NULL; qtest_init(qtest_chrdev, qtest_log, &local_err); if (local_err) { - error_report("%s", error_get_pretty(local_err)); - error_free(local_err); + error_report_err(local_err); exit(1); } } @@ -4056,7 +4051,7 @@ int main(int argc, char **argv, char **envp) if (order) { validate_bootdevices(order, &local_err); if (local_err) { - error_report("%s", error_get_pretty(local_err)); + error_report_err(local_err); exit(1); } boot_order = order; @@ -4066,7 +4061,7 @@ int main(int argc, char **argv, char **envp) if (once) { validate_bootdevices(once, &local_err); if (local_err) { - error_report("%s", error_get_pretty(local_err)); + error_report_err(local_err); exit(1); } normal_boot_order = g_strdup(boot_order); |