diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-04-27 01:47:35 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-04-27 01:47:35 +0000 |
commit | 64c7a74917f653145a398f91749518960d09b918 (patch) | |
tree | 09046b8fb5d7bf38d676161827a1926b82192b51 /ShellPkg | |
parent | ea4fe84fe5d1ac7bb9a47d2e8b36cef4a26622be (diff) | |
download | edk2-platforms-64c7a74917f653145a398f91749518960d09b918.tar.xz |
Enable print error info when execute the application.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13224 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r-- | ShellPkg/Application/Shell/Shell.c | 18 | ||||
-rw-r--r-- | ShellPkg/Application/Shell/Shell.uni | bin | 4618 -> 4612 bytes |
2 files changed, 17 insertions, 1 deletions
diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index aa4dfd37ab..35ffae8e9c 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -1310,6 +1310,7 @@ RunCommand( )
{
EFI_STATUS Status;
+ EFI_STATUS StatusCode;
CHAR16 *CommandName;
SHELL_STATUS ShellStatus;
UINTN Argc;
@@ -1557,11 +1558,26 @@ RunCommand( DevPath,
PostVariableCmdLine,
NULL,
- NULL
+ &StatusCode
);
+
+ //
+ // Updatet last error status.
+ //
+ UnicodeSPrint(LeString, sizeof(LeString)*sizeof(LeString[0]), L"0x%08x", StatusCode);
+ DEBUG_CODE(InternalEfiShellSetEnv(L"DebugLasterror", LeString, TRUE););
+ InternalEfiShellSetEnv(L"Lasterror", LeString, TRUE);
}
}
}
+
+ //
+ // Print some error info.
+ //
+ if (EFI_ERROR(Status)) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_ERROR), ShellInfoObject.HiiHandle, (VOID*)(Status));
+ }
+
CommandName = StrnCatGrow(&CommandName, NULL, ShellInfoObject.NewShellParametersProtocol->Argv[0], 0);
RestoreArgcArgv(ShellInfoObject.NewShellParametersProtocol, &Argv, &Argc);
diff --git a/ShellPkg/Application/Shell/Shell.uni b/ShellPkg/Application/Shell/Shell.uni Binary files differindex c4eb546af7..71484b441e 100644 --- a/ShellPkg/Application/Shell/Shell.uni +++ b/ShellPkg/Application/Shell/Shell.uni |