summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellLib
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2012-01-20 21:58:15 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2012-01-20 21:58:15 +0000
commit28d903168c23c808e069546b12a14e2e112a72cd (patch)
treed4a6504af3d075107f08f22630faf1dae2082cf8 /ShellPkg/Library/UefiShellLib
parenta32980dd3cd4e8f3fce521e51bdf2e27c418d1db (diff)
downloadedk2-platforms-28d903168c23c808e069546b12a14e2e112a72cd.tar.xz
ShellPkg: This patch fixes the redirection support for a Shell2 application running in Shell1.
signed-off-by: Richard_Chan@Dell.com reviewed-by: jcarsey git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12951 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellLib')
-rw-r--r--ShellPkg/Library/UefiShellLib/UefiShellLib.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
index 77cf5e7795..74f1cd3bac 100644
--- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
+++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
@@ -2587,10 +2587,12 @@ InternalPrintTo (
return (gEfiShellProtocol->WriteFile(gEfiShellParametersProtocol->StdOut, &Size, (VOID*)String));
}
if (mEfiShellInterface != NULL) {
- //
- // Divide in half for old shell. Must be string length not size.
- //
- Size /= 2;
+ if (mEfiShellInterface->RedirArgc == 0) {
+ //
+ // Divide in half for old shell. Must be string length not size.
+ //
+ Size /=2; // Divide in half only when no redirection.
+ }
return (mEfiShellInterface->StdOut->Write(mEfiShellInterface->StdOut, &Size, (VOID*)String));
}
ASSERT(FALSE);