mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2026-10-28 14:04:39 +08:00
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>
22 lines
547 B
C
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
|