From c27025e0448f65b67c36f962dd9e5f23f9ade735 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 20 Jan 2021 14:30:27 +0100 Subject: runstate: cleanup reboot and panic actions The possible choices for panic, reset and watchdog actions are inconsistent. "-action panic=poweroff" should be renamed to "-action panic=shutdown" on the command line. This is because "-action panic=poweroff" and "-action watchdog=poweroff" have slightly different semantics, the first does an unorderly exit while the second goes through qemu_cleanup(). With this change, -no-shutdown would not have to change "-action panic=pause" "pause", just like it does not have to change the reset action. "-action reboot=none" should be renamed to "-action reboot=reset". This should be self explanatory, since for example "-action panic=none" lets the guest proceed without taking any action. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- qapi/run-state.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'qapi/run-state.json') diff --git a/qapi/run-state.json b/qapi/run-state.json index 1f3b329f05..43d66d700f 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -330,14 +330,14 @@ # # Possible QEMU actions upon guest reboot # -# @none: Reset the VM +# @reset: Reset the VM # -# @shutdown: Shutdown the VM and exit +# @shutdown: Shutdown the VM and exit, according to the shutdown action # # Since: 6.0 ## { 'enum': 'RebootAction', - 'data': [ 'none', 'shutdown' ] } + 'data': [ 'reset', 'shutdown' ] } ## # @ShutdownAction: @@ -360,10 +360,12 @@ # # @pause: Pause the VM # +# @shutdown: Shutdown the VM and exit, according to the shutdown action +# # Since: 6.0 ## { 'enum': 'PanicAction', - 'data': [ 'poweroff', 'pause', 'none' ] } + 'data': [ 'pause', 'shutdown', 'none' ] } ## # @watchdog-set-action: -- cgit v1.2.3