]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel1CommandsLib/Exit.c
ShellPkg: Standardized HP Copyright Message String
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel1CommandsLib / Exit.c
index 5620d023b1223ac05e32d5a9bc330343ce137a8b..08e40dfc058889fb91907c2d235889ba2890971f 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   Main file for exit shell level 1 function.\r
 \r
+  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
   Copyright (c) 2009 - 2011, 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
@@ -56,7 +57,7 @@ ShellCommandRunExit (
   Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);\r
   if (EFI_ERROR(Status)) {\r
     if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {\r
-      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, ProblemParam);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, L"exit", ProblemParam);\r
       FreePool(ProblemParam);\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
@@ -71,22 +72,22 @@ ShellCommandRunExit (
     if (Return != NULL) {\r
       Status = ShellConvertStringToUint64(Return, &RetVal, FALSE, FALSE);\r
       if (EFI_ERROR(Status)) {\r
-        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, Return);\r
+        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel1HiiHandle, L"exit", Return);\r
         ShellStatus = SHELL_INVALID_PARAMETER;\r
       } else {\r
         //\r
         // If we are in a batch file and /b then pass TRUE otherwise false...\r
         //\r
-        ShellCommandRegisterExit((BOOLEAN)(gEfiShellProtocol->BatchIsActive() && ShellCommandLineGetFlag(Package, L"/b")));\r
+        ShellCommandRegisterExit((BOOLEAN)(gEfiShellProtocol->BatchIsActive() && ShellCommandLineGetFlag(Package, L"/b")), RetVal);\r
 \r
-        ShellStatus = (SHELL_STATUS)(RetVal);\r
+        ShellStatus = SHELL_SUCCESS;\r
       }\r
     } else {\r
       // If we are in a batch file and /b then pass TRUE otherwise false...\r
       //\r
-      ShellCommandRegisterExit((BOOLEAN)(gEfiShellProtocol->BatchIsActive() && ShellCommandLineGetFlag(Package, L"/b")));\r
+      ShellCommandRegisterExit((BOOLEAN)(gEfiShellProtocol->BatchIsActive() && ShellCommandLineGetFlag(Package, L"/b")), 0);\r
 \r
-      ShellStatus = (SHELL_STATUS)0;\r
+      ShellStatus = SHELL_SUCCESS;\r
     }\r
 \r
     ShellCommandLineFreeVarList (Package);\r