HMP: Prepend errors with 'Error:'

Always make error messages start with 'Error:' as a fallback
to make sure that anything parsing them can tell it failed.

Note: Some places don't use hmp_handle_error

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20190212134758.10514-3-dgilbert@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Dr. David Alan Gilbert 2019-02-12 13:47:56 +00:00 committed by Laurent Vivier
parent 65b182c379
commit 66363e9a43

2
hmp.c
View File

@ -62,7 +62,7 @@ static void hmp_handle_error(Monitor *mon, Error **errp)
{
assert(errp);
if (*errp) {
error_report_err(*errp);
error_reportf_err(*errp, "Error: ");
}
}