aboutsummaryrefslogtreecommitdiff
path: root/softmmu
diff options
context:
space:
mode:
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/runstate-action.c4
-rw-r--r--softmmu/runstate.c7
-rw-r--r--softmmu/vl.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/softmmu/runstate-action.c b/softmmu/runstate-action.c
index 99ce880..ae0761a 100644
--- a/softmmu/runstate-action.c
+++ b/softmmu/runstate-action.c
@@ -13,9 +13,9 @@
#include "qapi/error.h"
#include "qemu/option_int.h"
-RebootAction reboot_action = REBOOT_ACTION_NONE;
+RebootAction reboot_action = REBOOT_ACTION_RESET;
ShutdownAction shutdown_action = SHUTDOWN_ACTION_POWEROFF;
-PanicAction panic_action = PANIC_ACTION_POWEROFF;
+PanicAction panic_action = PANIC_ACTION_SHUTDOWN;
/*
* Receives actions to be applied for specific guest events
diff --git a/softmmu/runstate.c b/softmmu/runstate.c
index 6177693..beee050 100644
--- a/softmmu/runstate.c
+++ b/softmmu/runstate.c
@@ -471,14 +471,15 @@ void qemu_system_guest_panicked(GuestPanicInformation *info)
}
/*
* TODO: Currently the available panic actions are: none, pause, and
- * poweroff, but in principle debug and reset could be supported as well.
+ * shutdown, but in principle debug and reset could be supported as well.
* Investigate any potential use cases for the unimplemented actions.
*/
- if (panic_action == PANIC_ACTION_PAUSE) {
+ if (panic_action == PANIC_ACTION_PAUSE
+ || (panic_action == PANIC_ACTION_SHUTDOWN && shutdown_action == SHUTDOWN_ACTION_PAUSE)) {
qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE,
!!info, info);
vm_stop(RUN_STATE_GUEST_PANICKED);
- } else if (panic_action == PANIC_ACTION_POWEROFF) {
+ } else if (panic_action == PANIC_ACTION_SHUTDOWN) {
qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_POWEROFF,
!!info, info);
vm_stop(RUN_STATE_GUEST_PANICKED);
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 7ddf405..5930426 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3202,7 +3202,7 @@ void qemu_init(int argc, char **argv, char **envp)
break;
case QEMU_OPTION_no_shutdown:
olist = qemu_find_opts("action");
- qemu_opts_parse_noisily(olist, "panic=pause,shutdown=pause", false);
+ qemu_opts_parse_noisily(olist, "shutdown=pause", false);
break;
case QEMU_OPTION_uuid:
if (qemu_uuid_parse(optarg, &qemu_uuid) < 0) {