1.Fixed the bug when retrieved component name by child handle. It should used gEfiConsoleInDeviceGuid, gEfiConsoleOutDeviceGuid instead of gEfiSimpleTextInProtocolGuid and gEfiSimpleTextOutProtocolGuid.

2.Fixed one bug when creating Console Standard error handle.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10350 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2010-04-09 06:04:30 +00:00
parent f43b0774f2
commit 76649bf4d8
2 changed files with 31 additions and 31 deletions

View File

@ -1,7 +1,7 @@
/** @file
UEFI Component Name(2) protocol implementation for ConSplitter driver.
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
Copyright (c) 2006 - 2010, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -381,7 +381,7 @@ ConSplitterConInComponentNameGetControllerName (
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterConInDriverBinding.DriverBindingHandle,
&gEfiSimpleTextInProtocolGuid,
&gEfiConsoleInDeviceGuid,
ChildHandle,
&gEfiConsoleInDeviceGuid
);
@ -658,7 +658,7 @@ ConSplitterConOutComponentNameGetControllerName (
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterConOutDriverBinding.DriverBindingHandle,
&gEfiSimpleTextOutProtocolGuid,
&gEfiConsoleOutDeviceGuid,
ChildHandle,
&gEfiConsoleOutDeviceGuid
);
@ -758,7 +758,7 @@ ConSplitterStdErrComponentNameGetControllerName (
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterStdErrDriverBinding.DriverBindingHandle,
&gEfiSimpleTextOutProtocolGuid,
&gEfiStandardErrorDeviceGuid,
ChildHandle,
&gEfiStandardErrorDeviceGuid
);

View File

@ -16,7 +16,7 @@
never removed. Such design ensures sytem function well during none console
device situation.
Copyright (c) 2006 - 2009, Intel Corporation. <BR>
Copyright (c) 2006 - 2010, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -959,7 +959,7 @@ ConSplitterStart (
}
//
// Create virtual handle and open DeviceGuid on the virtul handle.
// Open the Parent Handle for the child.
//
Status = gBS->OpenProtocol (
ControllerHandle,
@ -1320,6 +1320,17 @@ ConSplitterStdErrDriverBindingStart (
// Construct console output devices' private data
//
Status = ConSplitterTextOutConstructor (&mStdErr);
if (!EFI_ERROR (Status)) {
//
// Create virtual device handle for StdErr Splitter
//
Status = gBS->InstallMultipleProtocolInterfaces (
&mStdErr.VirtualHandle,
&gEfiSimpleTextOutProtocolGuid,
&mStdErr.TextOut,
NULL
);
}
if (EFI_ERROR (Status)) {
return Status;
}
@ -1358,19 +1369,6 @@ ConSplitterStdErrDriverBindingStart (
}
if (mStdErr.CurrentNumberOfConsoles == 1) {
//
// Create virtual device handle for StdErr Splitter
//
Status = gBS->InstallMultipleProtocolInterfaces (
&mStdErr.VirtualHandle,
&gEfiSimpleTextOutProtocolGuid,
&mStdErr.TextOut,
NULL
);
if (EFI_ERROR (Status)) {
return Status;
}
gST->StandardErrorHandle = mStdErr.VirtualHandle;
gST->StdErr = &mStdErr.TextOut;
//
@ -1726,6 +1724,8 @@ ConSplitterStdErrDriverBindingStop (
}
if (mStdErr.CurrentNumberOfConsoles == 0) {
mStdErr.VirtualHandle = NULL;
gST->StandardErrorHandle = NULL;
gST->StdErr = NULL;
//