diff options
author | Maxim Uvarov <maxim.uvarov@linaro.org> | 2021-06-25 14:18:42 +0300 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-07-02 11:48:36 +0100 |
commit | e3bcf57c1a3c498fe7bd1f18744614a802d8859a (patch) | |
tree | fe4a1a850341388855a256c1fd154738560bcff9 /hw | |
parent | 103e7579ddbd539fbe38e150da78264d0496023a (diff) | |
download | qemu-e3bcf57c1a3c498fe7bd1f18744614a802d8859a.zip qemu-e3bcf57c1a3c498fe7bd1f18744614a802d8859a.tar.gz qemu-e3bcf57c1a3c498fe7bd1f18744614a802d8859a.tar.bz2 |
hw/gpio/gpio_pwr: use shutdown function for reboot
qemu has 2 type of functions: shutdown and reboot. Shutdown
function has to be used for machine shutdown. Otherwise we cause
a reset with a bogus "cause" value, when we intended a shutdown.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20210625111842.3790-3-maxim.uvarov@linaro.org
[PMM: tweaked commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/gpio/gpio_pwr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/gpio/gpio_pwr.c b/hw/gpio/gpio_pwr.c index 7714fa0..dbaf1c7 100644 --- a/hw/gpio/gpio_pwr.c +++ b/hw/gpio/gpio_pwr.c @@ -43,7 +43,7 @@ static void gpio_pwr_reset(void *opaque, int n, int level) static void gpio_pwr_shutdown(void *opaque, int n, int level) { if (level) { - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); + qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); } } |