restore original information when redirection fails inside a command using the split operator (|).

Signed-off-by: jcarsey
Reviewed-by: darylm503


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11831 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey 2011-06-15 22:25:14 +00:00
parent 6bab33c7b6
commit a9ca068447
1 changed files with 3 additions and 0 deletions

View File

@ -886,6 +886,9 @@ UpdateStdInStdOutStdErr(
||(StdErrFileName != NULL && !ErrUnicode && ErrAppend && (!EFI_ERROR(ShellFileExists(StdErrFileName)) && !EFI_ERROR(IsUnicodeFile(StdErrFileName)))) ||(StdErrFileName != NULL && !ErrUnicode && ErrAppend && (!EFI_ERROR(ShellFileExists(StdErrFileName)) && !EFI_ERROR(IsUnicodeFile(StdErrFileName))))
){ ){
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
ShellParameters->StdIn = *OldStdIn;
ShellParameters->StdOut = *OldStdOut;
ShellParameters->StdErr = *OldStdErr;
} else if (!EFI_ERROR(Status)){ } else if (!EFI_ERROR(Status)){
// //
// Open the Std<Whatever> and we should not have conflicts here... // Open the Std<Whatever> and we should not have conflicts here...