[PATCH 03/12] efi: move exit to EFI into own command

Lucas Stach l.stach at pengutronix.de
Mon Dec 8 05:42:30 PST 2014


Adds a command to drop back into the calling EFI process.

Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
 arch/efi/efi/efi.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c
index bdb992fb9f15..7b954695f9e8 100644
--- a/arch/efi/efi/efi.c
+++ b/arch/efi/efi/efi.c
@@ -344,3 +344,19 @@ efi_status_t efi_main(efi_handle_t image, efi_system_table_t *sys_table)
 
 	return EFI_SUCCESS;
 }
+
+static int do_efiexit(int argc, char *argv[])
+{
+	return BS->exit(efi_parent_image, EFI_SUCCESS, 0, NULL);
+}
+
+BAREBOX_CMD_HELP_START(efiexit)
+BAREBOX_CMD_HELP_TEXT("Leave barebox and return to the calling EFI process\n")
+BAREBOX_CMD_HELP_END
+
+BAREBOX_CMD_START(efiexit)
+	.cmd = do_efiexit,
+	BAREBOX_CMD_DESC("Usage: efiexit")
+	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
+	BAREBOX_CMD_HELP(cmd_efiexit_help)
+BAREBOX_CMD_END
-- 
2.1.3




More information about the barebox mailing list