]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Add Shell invocation option '-exit'
authorChen A Chen <chen.a.chen@intel.com>
Thu, 16 Mar 2017 05:22:40 +0000 (13:22 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Thu, 23 Mar 2017 04:48:51 +0000 (12:48 +0800)
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 <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
ShellPkg/Application/Shell/Shell.c
ShellPkg/Application/Shell/ShellProtocol.c

index 350d7ff13e49993a3f37cee83621f7faf8c572c8..dfcbfb89645373e50913eb6d0a6082898293ba66 100644 (file)
@@ -1022,7 +1022,7 @@ ProcessCommandLine(
       }\r
     } else if (UnicodeCollation->StriColl (\r
                                    UnicodeCollation,\r
-                                   L"-_exit",\r
+                                   L"-exit",\r
                                    CurrentArg\r
                                    ) == 0) {\r
       ShellInfoObject.ShellInitSettings.BitUnion.Bits.Exit         = TRUE;\r
index 12c7c40524ab6062555590d0d62ed351acaa2dfe..347e162e62759179736e79576942f3a4ffbd5268 100644 (file)
@@ -4,7 +4,7 @@
 \r
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -1781,7 +1781,7 @@ EfiShellExecute(
     Temp = NULL;\r
     Size = 0;\r
     ASSERT((Temp == NULL && Size == 0) || (Temp != NULL));\r
-    StrnCatGrow(&Temp, &Size, L"Shell.efi -_exit ", 0);\r
+    StrnCatGrow(&Temp, &Size, L"Shell.efi -exit ", 0);\r
     StrnCatGrow(&Temp, &Size, CommandLine, 0);\r
 \r
     Status = InternalShellExecuteDevicePath(\r