mirror of https://gitee.com/openkylin/qemu.git
error: New error_printf_unless_qmp()
This commit is contained in:
parent
ac8dae6794
commit
aa924ae730
11
qemu-error.c
11
qemu-error.c
|
@ -41,6 +41,17 @@ void error_printf(const char *fmt, ...)
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void error_printf_unless_qmp(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
if (!monitor_cur_is_qmp()) {
|
||||||
|
va_start(ap, fmt);
|
||||||
|
error_vprintf(fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static Location std_loc = {
|
static Location std_loc = {
|
||||||
.kind = LOC_NONE
|
.kind = LOC_NONE
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,6 +32,8 @@ void loc_set_file(const char *fname, int lno);
|
||||||
|
|
||||||
void error_vprintf(const char *fmt, va_list ap);
|
void error_vprintf(const char *fmt, va_list ap);
|
||||||
void error_printf(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
|
void error_printf(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
|
||||||
|
void error_printf_unless_qmp(const char *fmt, ...)
|
||||||
|
__attribute__ ((format(printf, 1, 2)));
|
||||||
void error_print_loc(void);
|
void error_print_loc(void);
|
||||||
void error_set_progname(const char *argv0);
|
void error_set_progname(const char *argv0);
|
||||||
void error_report(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
|
void error_report(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
|
||||||
|
|
Loading…
Reference in New Issue