aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sysemu/qtest.h2
-rw-r--r--qtest.c5
-rw-r--r--vl.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h
index 112a661ac4..6aca8e4c1f 100644
--- a/include/sysemu/qtest.h
+++ b/include/sysemu/qtest.h
@@ -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);
diff --git a/qtest.c b/qtest.c
index dcf1301229..a738afc724 100644
--- a/qtest.c
+++ b/qtest.c
@@ -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;
+}
diff --git a/vl.c b/vl.c
index 383be1b617..a7b00cdd37 100644
--- a/vl.c
+++ b/vl.c
@@ -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