Files
qemu/stubs/monitor-core.c
Marc-André Lureau b818e58ac4 monitor: move HMP-specific to monitor-hmp-internal.h
Move HMP-specific declarations to its own CONFIG_HMP guarded header.

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260828-qemu-no-hmp-v5-48-9227de146347@redhat.com>
2026-08-29 12:07:45 +04:00

22 lines
547 B
C

#include "qemu/osdep.h"
#include "monitor/hmp.h"
#ifdef CONFIG_HMP
int monitor_hmp_vprintf(MonitorHMP *mon, const char *fmt, va_list ap)
{
/*
* Pretend 'g_test_message' is our monitor console to
* stop the caller sending messages to stderr
*/
if (g_test_initialized() && !g_test_subprocess() &&
getenv("QTEST_SILENT_ERRORS")) {
char *msg = g_strdup_vprintf(fmt, ap);
g_test_message("%s", msg);
size_t ret = strlen(msg);
g_free(msg);
return ret;
}
return -1;
}
#endif