diff mbox series

[PULL,09/14] HMP: Prepend errors with 'Error:'

Message ID 20190214104717.3543-10-laurent@vivier.eu
State New
Headers show
Series [PULL,01/14] qapi: Fix qcow2 encryption doc typo | expand

Commit Message

Laurent Vivier Feb. 14, 2019, 10:47 a.m. UTC
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

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>
---
 hmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hmp.c b/hmp.c
index b2a2b1f84e33..4d14718fea4a 100644
--- a/hmp.c
+++ b/hmp.c
@@ -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: ");
     }
 }