monitor: remove redundant error_[v]printf_unless_qmp

The only callers of these functions have been removed. Adding any
new usage of them is highly undesirable, so they should be entirely
removed.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé
2025-09-10 16:29:31 +01:00
parent f917c060ee
commit 7818c014ef
3 changed files with 0 additions and 32 deletions

View File

@@ -59,7 +59,4 @@ void monitor_register_hmp(const char *name, bool info,
void monitor_register_hmp_info_hrt(const char *name,
HumanReadableText *(*handler)(Error **errp));
int error_vprintf_unless_qmp(const char *fmt, va_list ap) G_GNUC_PRINTF(1, 0);
int error_printf_unless_qmp(const char *fmt, ...) G_GNUC_PRINTF(1, 2);
#endif /* MONITOR_H */

View File

@@ -281,30 +281,6 @@ int error_vprintf(const char *fmt, va_list ap)
return vfprintf(stderr, fmt, ap);
}
int error_vprintf_unless_qmp(const char *fmt, va_list ap)
{
Monitor *cur_mon = monitor_cur();
if (!cur_mon) {
return vfprintf(stderr, fmt, ap);
}
if (!monitor_cur_is_qmp()) {
return monitor_vprintf(cur_mon, fmt, ap);
}
return -1;
}
int error_printf_unless_qmp(const char *fmt, ...)
{
va_list ap;
int ret;
va_start(ap, fmt);
ret = error_vprintf_unless_qmp(fmt, ap);
va_end(ap);
return ret;
}
static MonitorQAPIEventConf monitor_qapi_event_conf[QAPI_EVENT__MAX] = {
/* Limit guest-triggerable events to 1 per second */
[QAPI_EVENT_RTC_CHANGE] = { 1000 * SCALE_MS },

View File

@@ -16,8 +16,3 @@ int error_vprintf(const char *fmt, va_list ap)
}
return vfprintf(stderr, fmt, ap);
}
int error_vprintf_unless_qmp(const char *fmt, va_list ap)
{
return error_vprintf(fmt, ap);
}