]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: add error messages into function
authorJaben Carsey <jaben.carsey@intel.com>
Fri, 13 Dec 2013 23:53:59 +0000 (23:53 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 13 Dec 2013 23:53:59 +0000 (23:53 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14986 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Application/Shell/ShellParametersProtocol.c

index b6598c0cf40dc8329e453ad0d0e9ef1126c5e04d..9b385bee154e14cb0014a27ac958b8632968f283 100644 (file)
@@ -1163,8 +1163,15 @@ UpdateStdInStdOutStdErr(
   CalculateEfiHdrCrc(&gST->Hdr);\r
 \r
   if (gST->ConIn == NULL ||gST->ConOut == NULL) {\r
-    return (EFI_OUT_OF_RESOURCES);\r
+    Status = EFI_OUT_OF_RESOURCES;\r
   }\r
+\r
+  if (Status == EFI_NOT_FOUND) {\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_REDUNDA_REDIR), ShellInfoObject.HiiHandle);\r
+  } else if (EFI_ERROR(Status)) {\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_INVALID_REDIR), ShellInfoObject.HiiHandle);\r
+  }\r
+\r
   return (Status);\r
 }\r
 \r