提交 b3be57c3 编写于 作者: M Michael S. Tsirkin 提交者: Andreas Färber

qtest: don't report signals if qtest driver enabled

qtest driver always uses signals to kill qemu
no need to report it, whatever the accelerator state.

Add API to detect qtest driver, and suppress reporting
signals in this case.
Reported-by: NAndreas Färber <afaerber@suse.de>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 f673e70c
......@@ -23,6 +23,8 @@ static inline bool qtest_enabled(void)
return qtest_allowed;
}
bool qtest_driver(void);
int qtest_init_accel(void);
void qtest_init(const char *qtest_chrdev, const char *qtest_log);
......
......@@ -528,3 +528,8 @@ void qtest_init(const char *qtest_chrdev, const char *qtest_log)
qtest_chr = chr;
}
bool qtest_driver(void)
{
return qtest_chr;
}
......@@ -1750,7 +1750,7 @@ static int qemu_shutdown_requested(void)
static void qemu_kill_report(void)
{
if (!qtest_enabled() && shutdown_signal != -1) {
if (!qtest_driver() && shutdown_signal != -1) {
fprintf(stderr, "qemu: terminating on signal %d", shutdown_signal);
if (shutdown_pid == 0) {
/* This happens for eg ^C at the terminal, so it's worth
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册