sandbox: poweroff in efi_system_reset()
efi_system_reset() should exit if called with EFI_RESET_SHUTDOWN.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index a74f5ec..13b0731 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -434,8 +434,10 @@
efi_status_t reset_status,
unsigned long data_size, void *reset_data)
{
- os_fd_restore();
- os_relaunch(os_argv);
+ if (reset_type == EFI_RESET_SHUTDOWN)
+ sandbox_exit();
+ else
+ sandbox_reset();
}
void sandbox_reset(void)