]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/ShellProtocol.c
ShellPkg: Add Shell invocation option '-exit'
[mirror_edk2.git] / ShellPkg / Application / Shell / ShellProtocol.c
index 2bc0646b453d6111336fd3aa6c5a6a2bdcbc4bd0..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
@@ -2207,7 +2207,7 @@ EfiShellGetGuidFromName(
   Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);\r
 \r
   if (!EFI_ERROR(Status)) {\r
-    CopyGuid(NewGuid, Guid);\r
+    CopyGuid(Guid, NewGuid);\r
   }\r
 \r
   return (Status);\r
@@ -2872,8 +2872,8 @@ InternalEfiShellSetEnv(
                );\r
     if (!EFI_ERROR (Status)) {\r
       Status = Volatile\r
-             ? SHELL_SET_ENVIRONMENT_VARIABLE_V(Name, StrSize(Value), Value)\r
-             : SHELL_SET_ENVIRONMENT_VARIABLE_NV(Name, StrSize(Value), Value);\r
+             ? SHELL_SET_ENVIRONMENT_VARIABLE_V (Name, StrSize (Value) - sizeof (CHAR16), Value)\r
+             : SHELL_SET_ENVIRONMENT_VARIABLE_NV (Name, StrSize (Value) - sizeof (CHAR16), Value);\r
       if (EFI_ERROR (Status)) {\r
         ShellRemvoeEnvVarFromList(Name);\r
       }\r