summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-10-16 07:44:53 +0200
committerAlexander Graf <agraf@suse.de>2018-12-02 21:59:36 +0100
commite706ed7f5b291282e8747e65c2f2d0e4f8ef5e03 (patch)
tree61a99557f5903e6d13b5be2ea54031bed7a156c2 /lib
parent1c32bb101026eb8f693544824f015a6c3cfefe60 (diff)
downloadu-boot-e706ed7f5b291282e8747e65c2f2d0e4f8ef5e03.tar.gz
efi_loader: implement EFI_RESET_SHUTDOWN at boot time
Allow an EFI application to shut down the system. If EFI_RESET_SHUTDOWN is issued call do_poweroff(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_runtime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index f059dc97fd..abcf03c5a4 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -141,7 +141,9 @@ static void EFIAPI efi_reset_system_boottime(
do_reset(NULL, 0, 0, NULL);
break;
case EFI_RESET_SHUTDOWN:
- /* We don't have anything to map this to */
+#ifdef CONFIG_CMD_POWEROFF
+ do_poweroff(NULL, 0, 0, NULL);
+#endif
break;
}