summaryrefslogtreecommitdiffstats
path: root/softmmu/runstate-action.c
diff options
context:
space:
mode:
Diffstat (limited to 'softmmu/runstate-action.c')
-rw-r--r--softmmu/runstate-action.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/softmmu/runstate-action.c b/softmmu/runstate-action.c
index 44de01adaf..99ce880886 100644
--- a/softmmu/runstate-action.c
+++ b/softmmu/runstate-action.c
@@ -15,6 +15,7 @@
RebootAction reboot_action = REBOOT_ACTION_NONE;
ShutdownAction shutdown_action = SHUTDOWN_ACTION_POWEROFF;
+PanicAction panic_action = PANIC_ACTION_POWEROFF;
/*
* Receives actions to be applied for specific guest events
@@ -30,6 +31,10 @@ void qmp_set_action(bool has_reboot, RebootAction reboot,
reboot_action = reboot;
}
+ if (has_panic) {
+ panic_action = panic;
+ }
+
if (has_watchdog) {
qmp_watchdog_set_action(watchdog, errp);
}