sandbox: poweroff in efi_system_reset()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 20 Nov 2021 13:49:18 +0000 (14:49 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 26 Nov 2021 20:30:59 +0000 (21:30 +0100)
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>
arch/sandbox/cpu/start.c

index a74f5ec..13b0731 100644 (file)
@@ -434,8 +434,10 @@ void __efi_runtime EFIAPI efi_reset_system(
                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)