Paolo Bonzini <pbonz...@redhat.com> writes: > On 06/06/2016 14:06, Daniel P. Berrange wrote: >>> > @@ -3838,6 +3834,10 @@ void vnc_display_open(const char *id, Error **errp) >>> > } >>> > } >>> > >>> > + if (show_vnc_port) { >>> > + vnc_display_print_local_addr(vs); >>> > + } >>> > + >>> > qapi_free_SocketAddress(saddr); >>> > qapi_free_SocketAddress(wsaddr); >>> > return; >> By calling this from vnc_display_open, you'll cause it to >> print to stdout, even when using QMP, because qmp_change_vnc_listen >> calls vnc_display_open. > > Hmm, yes. Markus, what's the best thing to do? Some kind of > monitor_printf?
Would error_printf_unless_qmp() do? We already use it in vnc_display_password().