]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel1CommandsLib/Exit.c
ShellPkg: Eliminate loss of high bits in return value from exit command on 64 bit...
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel1CommandsLib / Exit.c
index 5620d023b1223ac05e32d5a9bc330343ce137a8b..3a3c59fa0396eed88f65d4066309a78c3c4c5ddb 100644 (file)
@@ -77,16 +77,16 @@ ShellCommandRunExit (
         //\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