summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-06-01 19:22:28 +0300
committerTom Rini <trini@konsulko.com>2023-07-14 19:54:50 +0300
commit06d3414ac77332c808e255a7036edad6f631b3d2 (patch)
treebc8505b87b18bb8a93b704c44ac70d1a7018a3fb /arch/sandbox/cpu
parentdef898c458e65a71fb64cda370b4281cd026e48c (diff)
downloadu-boot-06d3414ac77332c808e255a7036edad6f631b3d2.tar.xz
sandbox: Fix quiting when the LCD window is closed
With recent changes to how sandbox handles reset, closing the window currently just restarts sandbox. Use the correct sysreset type to tell it to shut down. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r--arch/sandbox/cpu/sdl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c
index 2c570ed8d1..590e406517 100644
--- a/arch/sandbox/cpu/sdl.c
+++ b/arch/sandbox/cpu/sdl.c
@@ -6,6 +6,7 @@
#include <errno.h>
#include <unistd.h>
#include <stdbool.h>
+#include <sysreset.h>
#include <linux/input.h>
#include <SDL2/SDL.h>
#include <asm/state.h>
@@ -81,7 +82,7 @@ static void sandbox_sdl_poll_events(void)
switch (event.type) {
case SDL_QUIT:
puts("LCD window closed - quitting\n");
- reset_cpu();
+ sysreset_walk(SYSRESET_POWER_OFF);
break;
}
}