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>
This commit is contained in:
Daniel P. Berrangé 2021-02-19 17:56:13 +00:00
parent 5994dcb8d8
commit 283d845c91
4 changed files with 11 additions and 11 deletions

View file

@ -716,8 +716,8 @@ int monitor_init(MonitorOptions *opts, bool allow_hmp, Error **errp)
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;