diff options
| author | Clément Chigot <chigot@adacore.com> | 2023-10-03 09:14:23 +0200 |
|---|---|---|
| committer | Alistair Francis <alistair.francis@wdc.com> | 2023-10-12 12:32:20 +1000 |
| commit | 0386f39b46a28da87647075f0fc20da4ba1f6478 (patch) | |
| tree | fe8e3ae31719392938ca5b480857fb021d16e33f /include | |
| parent | eb992b609159212c55ed26971dde7743c956cb7a (diff) | |
| download | focaccia-qemu-0386f39b46a28da87647075f0fc20da4ba1f6478.tar.gz focaccia-qemu-0386f39b46a28da87647075f0fc20da4ba1f6478.zip | |
softmmu: add means to pass an exit code when requesting a shutdown
As of now, the exit code was either EXIT_FAILURE when a panic shutdown was requested or EXIT_SUCCESS otherwise. However, some hardware could want to pass more complex exit codes. Thus, introduce a new shutdown request function allowing that. Signed-off-by: Clément Chigot <chigot@adacore.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20231003071427.188697-2-chigot@adacore.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sysemu/runstate.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index 08afb97695..c8c2bd8a61 100644 --- a/include/sysemu/runstate.h +++ b/include/sysemu/runstate.h @@ -68,6 +68,8 @@ void qemu_system_wakeup_request(WakeupReason reason, Error **errp); void qemu_system_wakeup_enable(WakeupReason reason, bool enabled); void qemu_register_wakeup_notifier(Notifier *notifier); void qemu_register_wakeup_support(void); +void qemu_system_shutdown_request_with_code(ShutdownCause reason, + int exit_code); void qemu_system_shutdown_request(ShutdownCause reason); void qemu_system_powerdown_request(void); void qemu_register_powerdown_notifier(Notifier *notifier); |