aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/vl.c b/vl.c
index b5795df40d..86bdce07e3 100644
--- a/vl.c
+++ b/vl.c
@@ -1281,7 +1281,7 @@ static int usb_parse(const char *cmdline)
return r;
}
-void do_usb_add(Monitor *mon, const QDict *qdict)
+void hmp_usb_add(Monitor *mon, const QDict *qdict)
{
const char *devname = qdict_get_str(qdict, "devname");
if (usb_device_add(devname) < 0) {
@@ -1289,7 +1289,7 @@ void do_usb_add(Monitor *mon, const QDict *qdict)
}
}
-void do_usb_del(Monitor *mon, const QDict *qdict)
+void hmp_usb_del(Monitor *mon, const QDict *qdict)
{
const char *devname = qdict_get_str(qdict, "devname");
if (usb_device_del(devname) < 0) {
@@ -2134,8 +2134,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;
@@ -2215,8 +2214,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);
@@ -2580,8 +2578,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;
}
@@ -2634,8 +2631,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;
@@ -3755,7 +3751,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);
}
@@ -4022,8 +4018,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);
}
}
@@ -4045,7 +4040,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;
@@ -4055,7 +4050,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);