summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Application/Shell/Shell.c18
-rw-r--r--ShellPkg/Application/Shell/Shell.unibin4618 -> 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
index c4eb546af7..71484b441e 100644
--- a/ShellPkg/Application/Shell/Shell.uni
+++ b/ShellPkg/Application/Shell/Shell.uni
Binary files differ