On Thu, Sep 11, 2025 at 06:05:01PM +0000, Richard Henderson wrote: > On 9/10/25 18:03, Daniel P. Berrangé wrote: > > + } else { > > + print_func = (error_print_func)fprintf; > > + print_vfunc = (error_print_vfunc)vfprintf; > > + print_opaque = stderr; > > + } > > + > > + if (message_with_timestamp && !cur) { > > timestr = real_time_iso8601(); > > - error_printf("%s ", timestr); > > + print_func(print_opaque, "%s ", timestr); > > g_free(timestr); > > } > > /* Only prepend guest name if -msg guest-name and -name guest=... are > > set */ > > - if (error_with_guestname && error_guest_name && !monitor_cur_hmp()) { > > - error_printf("%s ", error_guest_name); > > + if (error_with_guestname && error_guest_name && !cur) { > > + print_func(print_opaque, "%s ", error_guest_name); > > } > > It's worth pushing these second and third if into the first else, > so that !cur is already true.
You've probably seen now that these 'if' blocks go away in the later patch and the "qmessage_context_print(stderr);" that replaces them is indeed inside the first 'else'. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|