diff options
author | Alejandro Jimenez <alejandro.j.jimenez@oracle.com> | 2020-12-11 11:52:43 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-15 12:51:57 -0500 |
commit | e6dba0481363ad343c5f984dd4de3dd06d79ee68 (patch) | |
tree | 8c970cec81095fd7cb39f9b8b011f335f4bf5ec2 /include | |
parent | ebe3444468a4913e0208db1f74ea9336c7580202 (diff) | |
download | qemu-e6dba0481363ad343c5f984dd4de3dd06d79ee68.zip qemu-e6dba0481363ad343c5f984dd4de3dd06d79ee68.tar.gz qemu-e6dba0481363ad343c5f984dd4de3dd06d79ee68.tar.bz2 |
qmp: generalize watchdog-set-action to -no-reboot/-no-shutdown
Add a QMP command to allow for the behaviors specified by the
-no-reboot and -no-shutdown command line option to be set at runtime.
The new command is named set-action and takes optional arguments, named
after an event, that provide a corresponding action to take.
Example:
-> { "execute": "set-action",
"arguments": {
"reboot": "none",
"shutdown": "poweroff",
"watchdog": "debug" } }
<- { "return": {} }
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Message-Id: <1607705564-26264-4-git-send-email-alejandro.j.jimenez@oracle.com>
[Split the series differently, with -action based on the QMP command. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sysemu/runstate-action.h | 18 | ||||
-rw-r--r-- | include/sysemu/sysemu.h | 2 |
2 files changed, 18 insertions, 2 deletions
diff --git a/include/sysemu/runstate-action.h b/include/sysemu/runstate-action.h new file mode 100644 index 0000000..51a461c --- /dev/null +++ b/include/sysemu/runstate-action.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2020 Oracle and/or its affiliates. + * + * This work is licensed under the terms of the GNU GPL, version 2. + * See the COPYING file in the top-level directory. + * + */ + +#ifndef RUNSTATE_ACTION_H +#define RUNSTATE_ACTION_H + +#include "qapi/qapi-commands-run-state.h" + +/* in softmmu/runstate-action.c */ +extern RebootAction reboot_action; +extern ShutdownAction shutdown_action; + +#endif /* RUNSTATE_ACTION_H */ diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index e8f463f..8fae667 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -43,8 +43,6 @@ extern int win2k_install_hack; extern int alt_grab; extern int ctrl_grab; extern int graphic_rotate; -extern int no_shutdown; -extern int no_reboot; extern int old_param; extern int boot_menu; extern bool boot_strict; |