Files
xemu/stubs/error-printf.c
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
539 B
C
Raw Normal View History

#include "qemu/osdep.h"
#include "qemu/error-report.h"
#include "monitor/monitor.h"
int error_vprintf(const char *fmt, va_list ap)
{
int ret;
if (g_test_initialized() && !g_test_subprocess() &&
getenv("QTEST_SILENT_ERRORS")) {
2016-10-24 18:31:03 +02:00
char *msg = g_strdup_vprintf(fmt, ap);
g_test_message("%s", msg);
ret = strlen(msg);
2016-10-24 18:31:03 +02:00
g_free(msg);
return ret;
2016-10-24 18:31:03 +02:00
}
return vfprintf(stderr, fmt, ap);
}
int error_vprintf_unless_qmp(const char *fmt, va_list ap)
{
return error_vprintf(fmt, ap);
}