diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-15 22:25:14 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-15 22:25:14 +0000 |
commit | a9ca068447cf9151eb65389bfc60cbc89fc78aa0 (patch) | |
tree | b7ca23a0c0440b951e71f9975e52482cf1e53047 | |
parent | 6bab33c7b677dea7a67df512ef1a058daeebef57 (diff) | |
download | edk2-platforms-a9ca068447cf9151eb65389bfc60cbc89fc78aa0.tar.xz |
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
-rw-r--r-- | ShellPkg/Application/Shell/ShellParametersProtocol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c b/ShellPkg/Application/Shell/ShellParametersProtocol.c index 5d2792ba30..99a7294842 100644 --- a/ShellPkg/Application/Shell/ShellParametersProtocol.c +++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c @@ -886,6 +886,9 @@ UpdateStdInStdOutStdErr( ||(StdErrFileName != NULL && !ErrUnicode && ErrAppend && (!EFI_ERROR(ShellFileExists(StdErrFileName)) && !EFI_ERROR(IsUnicodeFile(StdErrFileName))))
){
Status = EFI_INVALID_PARAMETER;
+ ShellParameters->StdIn = *OldStdIn;
+ ShellParameters->StdOut = *OldStdOut;
+ ShellParameters->StdErr = *OldStdErr;
} else if (!EFI_ERROR(Status)){
//
// Open the Std<Whatever> and we should not have conflicts here...
|