From cc31ac1e40034b631793e068d49acdfccb56e46d Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Fri, 13 Dec 2013 23:53:59 +0000 Subject: ShellPkg: add error messages into function Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey Reviewed-by: Erik Bjorge git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14986 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/ShellParametersProtocol.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ShellPkg') diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c b/ShellPkg/Application/Shell/ShellParametersProtocol.c index b6598c0cf4..9b385bee15 100644 --- a/ShellPkg/Application/Shell/ShellParametersProtocol.c +++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c @@ -1163,8 +1163,15 @@ UpdateStdInStdOutStdErr( CalculateEfiHdrCrc(&gST->Hdr); if (gST->ConIn == NULL ||gST->ConOut == NULL) { - return (EFI_OUT_OF_RESOURCES); + Status = EFI_OUT_OF_RESOURCES; } + + if (Status == EFI_NOT_FOUND) { + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_REDUNDA_REDIR), ShellInfoObject.HiiHandle); + } else if (EFI_ERROR(Status)) { + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_INVALID_REDIR), ShellInfoObject.HiiHandle); + } + return (Status); } -- cgit v1.2.3