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.
r~