From: Chen A Chen Date: Thu, 16 Mar 2017 05:22:40 +0000 (+0800) Subject: ShellPkg: Add Shell invocation option '-exit' X-Git-Tag: edk2-stable201903~4334 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=6ca29fa310d49dd0b224357de7990fd775b61d18 ShellPkg: Add Shell invocation option '-exit' According to Shell spec 2.2 '-exit' invocation option is used to specify that after running the command line when launched, the UEFI Shell must immediately exit. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen A Chen Reviewed-by: Jaben Carsey --- diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index 350d7ff13e..dfcbfb8964 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -1022,7 +1022,7 @@ ProcessCommandLine( } } else if (UnicodeCollation->StriColl ( UnicodeCollation, - L"-_exit", + L"-exit", CurrentArg ) == 0) { ShellInfoObject.ShellInitSettings.BitUnion.Bits.Exit = TRUE; diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c index 12c7c40524..347e162e62 100644 --- a/ShellPkg/Application/Shell/ShellProtocol.c +++ b/ShellPkg/Application/Shell/ShellProtocol.c @@ -4,7 +4,7 @@ (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1781,7 +1781,7 @@ EfiShellExecute( Temp = NULL; Size = 0; ASSERT((Temp == NULL && Size == 0) || (Temp != NULL)); - StrnCatGrow(&Temp, &Size, L"Shell.efi -_exit ", 0); + StrnCatGrow(&Temp, &Size, L"Shell.efi -exit ", 0); StrnCatGrow(&Temp, &Size, CommandLine, 0); Status = InternalShellExecuteDevicePath(