ShellPkg: Fix ASCII input redirection does not work correctly.

When executing 'ls -b <a arg.txt' Shell cannot get the ASCII char in 'arg.txt' correctly. 
This patch updates the file read buffer size when read from ASCII file to fix the bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Signed-off-by: Felix Poludov <Felixp@ami.com>
Signed-off-by: Oleksiy Yakovlev <Oleksiyy@ami.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18609 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Qiu Shumin
2015-10-15 02:43:31 +00:00
committed by shenshushi
parent da6b8feb22
commit 48cb33ec30
3 changed files with 39 additions and 8 deletions

View File

@ -17,6 +17,8 @@
#include "Shell.h"
BOOLEAN AsciiRedirection = FALSE;
/**
Return the next parameter's end from a command line string.
@ -726,6 +728,7 @@ UpdateStdInStdOutStdErr(
OutUnicode = TRUE;
InUnicode = TRUE;
AsciiRedirection = FALSE;
ErrUnicode = TRUE;
StdInVarName = NULL;
StdOutVarName = NULL;
@ -1004,6 +1007,7 @@ UpdateStdInStdOutStdErr(
} else {
StdInFileName = CommandLineWalker += 4;
InUnicode = FALSE;
AsciiRedirection = TRUE;
}
if (StrStr(CommandLineWalker, L" <a ") != NULL) {
Status = EFI_NOT_FOUND;