summaryrefslogtreecommitdiffstats
path: root/monitor
diff options
context:
space:
mode:
authorMarc-André Lureau2022-04-20 15:26:13 +0200
committerMarc-André Lureau2022-04-21 15:09:09 +0200
commit756a98dd701ec3a9127c700ba9e7e93254b05f28 (patch)
tree4ddca1486227ea02155a7f3614e8b95ac374d624 /monitor
parenttests: run-time skip test-qga if TSAN is enabled (diff)
downloadqemu-756a98dd701ec3a9127c700ba9e7e93254b05f28.tar.gz
qemu-756a98dd701ec3a9127c700ba9e7e93254b05f28.tar.xz
qemu-756a98dd701ec3a9127c700ba9e7e93254b05f28.zip
Move error_printf_unless_qmp() with monitor unit
Since it depends on monitor code, and error_vprintf_unless_qmp() is already there. This will help to move error-report in a common subproject. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-31-marcandre.lureau@redhat.com>
Diffstat (limited to 'monitor')
-rw-r--r--monitor/monitor.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/monitor/monitor.c b/monitor/monitor.c
index 21c7a68758..86949024f6 100644
--- a/monitor/monitor.c
+++ b/monitor/monitor.c
@@ -286,6 +286,16 @@ int error_vprintf_unless_qmp(const char *fmt, va_list 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 */