summaryrefslogtreecommitdiffstats
path: root/qdev-monitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-12-18 16:35:07 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:24 -0600
commit000750b0c66a3eb1a71d6f01ae39eda8f56626ad (patch)
treec1194f26b67fd490f8ce82a0706c6b6ebc1c1ddb /qdev-monitor.c
parent8c3567700b86e883380b206c1284dcaf6b850f6c (diff)
downloadhqemu-000750b0c66a3eb1a71d6f01ae39eda8f56626ad.zip
hqemu-000750b0c66a3eb1a71d6f01ae39eda8f56626ad.tar.gz
error: Use error_report_err() instead of ad hoc prints
Unlike ad hoc prints, error_report_err() uses the error whole instead of just its message obtained with error_get_pretty(). This avoids suppressing its hint (see commit 50b7b00). Example: $ bld/ivshmem-server -l 42@ Parameter 'shm_size' expects a size You may use k, M, G or T suffixes for kilobytes, megabytes, gigabytes and terabytes. The last line is new with this patch. While there, drop a "cannot parse shm size: " message prefix; it's redundant, because the error message proper is always of the form "Parameter 'shm_size' expects ...". Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1450452927-8346-5-git-send-email-armbru@redhat.com>
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 30936df..3ce4710 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -266,8 +266,7 @@ int qdev_device_help(QemuOpts *opts)
return 1;
error:
- error_printf("%s\n", error_get_pretty(local_err));
- error_free(local_err);
+ error_report_err(local_err);
return 1;
}
OpenPOWER on IntegriCloud