sim-card
/
qemu
Archived
10
0
Fork 0
This repository has been archived on 2022-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
qemu/qemu-error.c

35 lines
685 B
C
Raw Normal View History

#include <stdio.h>
#include "monitor.h"
#include "sysemu.h"
void qemu_error(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
if (cur_mon) {
monitor_vprintf(cur_mon, fmt, args);
} else {
vfprintf(stderr, fmt, args);
}
va_end(args);
}
void qemu_error_internal(const char *file, int linenr, const char *func,
const char *fmt, ...)
{
va_list va;
QError *qerror;
va_start(va, fmt);
qerror = qerror_from_info(file, linenr, func, fmt, &va);
va_end(va);
if (cur_mon) {
monitor_set_error(cur_mon, qerror);
} else {
qerror_print(qerror);
QDECREF(qerror);
}
}