monitor: raise error when 'pretty' option is used with HMP
This is only semantically useful for QMP.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
diff --git a/monitor/monitor.c b/monitor/monitor.c
index 640496e..636bcc8 100644
--- a/monitor/monitor.c
+++ b/monitor/monitor.c
@@ -716,8 +716,8 @@
return -1;
}
if (opts->pretty) {
- warn_report("'pretty' is deprecated for HMP monitors, it has no "
- "effect and will be removed in future versions");
+ error_setg(errp, "'pretty' is not compatible with HMP monitors");
+ return -1;
}
monitor_init_hmp(chr, true, &local_err);
break;