From b6b22b132ada04696a0f7481a12169808c3e2b3e Mon Sep 17 00:00:00 2001 From: jcarsey Date: Thu, 15 Sep 2011 20:10:39 +0000 Subject: ShellPkg: Eliminate loss of high bits in return value from exit command on 64 bit platform. submitted-by: jcarsey reviewed-by: gookboy15a reviewed-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12356 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellLevel1CommandsLib/Exit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ShellPkg/Library/UefiShellLevel1CommandsLib') diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/Exit.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/Exit.c index 5620d023b1..3a3c59fa03 100644 --- a/ShellPkg/Library/UefiShellLevel1CommandsLib/Exit.c +++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/Exit.c @@ -77,16 +77,16 @@ ShellCommandRunExit ( // // If we are in a batch file and /b then pass TRUE otherwise false... // - ShellCommandRegisterExit((BOOLEAN)(gEfiShellProtocol->BatchIsActive() && ShellCommandLineGetFlag(Package, L"/b"))); + ShellCommandRegisterExit((BOOLEAN)(gEfiShellProtocol->BatchIsActive() && ShellCommandLineGetFlag(Package, L"/b")), RetVal); - ShellStatus = (SHELL_STATUS)(RetVal); + ShellStatus = SHELL_SUCCESS; } } else { // If we are in a batch file and /b then pass TRUE otherwise false... // - ShellCommandRegisterExit((BOOLEAN)(gEfiShellProtocol->BatchIsActive() && ShellCommandLineGetFlag(Package, L"/b"))); + ShellCommandRegisterExit((BOOLEAN)(gEfiShellProtocol->BatchIsActive() && ShellCommandLineGetFlag(Package, L"/b")), 0); - ShellStatus = (SHELL_STATUS)0; + ShellStatus = SHELL_SUCCESS; } ShellCommandLineFreeVarList (Package); -- cgit v1.2.3