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
/** @file\r
UEFI Component Name(2) protocol implementation for ConSplitter driver.\r
\r
/** @file\r
UEFI Component Name(2) protocol implementation for ConSplitter driver.\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
Status = ConSplitterTestControllerHandles (\r
ControllerHandle,\r
gConSplitterConInDriverBinding.DriverBindingHandle,\r
Status = ConSplitterTestControllerHandles (\r
ControllerHandle,\r
gConSplitterConInDriverBinding.DriverBindingHandle,\r
- &gEfiSimpleTextInProtocolGuid,\r
+ &gEfiConsoleInDeviceGuid,\r
ChildHandle,\r
&gEfiConsoleInDeviceGuid\r
);\r
ChildHandle,\r
&gEfiConsoleInDeviceGuid\r
);\r
Status = ConSplitterTestControllerHandles (\r
ControllerHandle,\r
gConSplitterConOutDriverBinding.DriverBindingHandle,\r
Status = ConSplitterTestControllerHandles (\r
ControllerHandle,\r
gConSplitterConOutDriverBinding.DriverBindingHandle,\r
- &gEfiSimpleTextOutProtocolGuid,\r
+ &gEfiConsoleOutDeviceGuid,\r
ChildHandle,\r
&gEfiConsoleOutDeviceGuid\r
);\r
ChildHandle,\r
&gEfiConsoleOutDeviceGuid\r
);\r
Status = ConSplitterTestControllerHandles (\r
ControllerHandle,\r
gConSplitterStdErrDriverBinding.DriverBindingHandle,\r
Status = ConSplitterTestControllerHandles (\r
ControllerHandle,\r
gConSplitterStdErrDriverBinding.DriverBindingHandle,\r
- &gEfiSimpleTextOutProtocolGuid,\r
+ &gEfiStandardErrorDeviceGuid,\r
ChildHandle,\r
&gEfiStandardErrorDeviceGuid\r
);\r
ChildHandle,\r
&gEfiStandardErrorDeviceGuid\r
);\r
never removed. Such design ensures sytem function well during none console\r
device situation.\r
\r
never removed. Such design ensures sytem function well during none console\r
device situation.\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
- // Create virtual handle and open DeviceGuid on the virtul handle.\r
+ // Open the Parent Handle for the child.\r
//\r
Status = gBS->OpenProtocol (\r
ControllerHandle,\r
//\r
Status = gBS->OpenProtocol (\r
ControllerHandle,\r
// Construct console output devices' private data\r
//\r
Status = ConSplitterTextOutConstructor (&mStdErr);\r
// Construct console output devices' private data\r
//\r
Status = ConSplitterTextOutConstructor (&mStdErr);\r
+ if (!EFI_ERROR (Status)) {\r
+ //\r
+ // Create virtual device handle for StdErr Splitter\r
+ //\r
+ Status = gBS->InstallMultipleProtocolInterfaces (\r
+ &mStdErr.VirtualHandle,\r
+ &gEfiSimpleTextOutProtocolGuid,\r
+ &mStdErr.TextOut,\r
+ NULL\r
+ );\r
+ }\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
}\r
\r
if (mStdErr.CurrentNumberOfConsoles == 1) {\r
}\r
\r
if (mStdErr.CurrentNumberOfConsoles == 1) {\r
- //\r
- // Create virtual device handle for StdErr Splitter\r
- //\r
- Status = gBS->InstallMultipleProtocolInterfaces (\r
- &mStdErr.VirtualHandle,\r
- &gEfiSimpleTextOutProtocolGuid,\r
- &mStdErr.TextOut,\r
- NULL\r
- );\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
- }\r
-\r
gST->StandardErrorHandle = mStdErr.VirtualHandle;\r
gST->StdErr = &mStdErr.TextOut;\r
//\r
gST->StandardErrorHandle = mStdErr.VirtualHandle;\r
gST->StdErr = &mStdErr.TextOut;\r
//\r
}\r
\r
if (mStdErr.CurrentNumberOfConsoles == 0) {\r
}\r
\r
if (mStdErr.CurrentNumberOfConsoles == 0) {\r
+ mStdErr.VirtualHandle = NULL;\r
+\r
gST->StandardErrorHandle = NULL;\r
gST->StdErr = NULL;\r
//\r
gST->StandardErrorHandle = NULL;\r
gST->StdErr = NULL;\r
//\r
CurrentGraphicsOutputMode->SizeOfInfo = GraphicsOutput->Mode->SizeOfInfo;\r
CurrentGraphicsOutputMode->FrameBufferBase = GraphicsOutput->Mode->FrameBufferBase;\r
CurrentGraphicsOutputMode->FrameBufferSize = GraphicsOutput->Mode->FrameBufferSize;\r
CurrentGraphicsOutputMode->SizeOfInfo = GraphicsOutput->Mode->SizeOfInfo;\r
CurrentGraphicsOutputMode->FrameBufferBase = GraphicsOutput->Mode->FrameBufferBase;\r
CurrentGraphicsOutputMode->FrameBufferSize = GraphicsOutput->Mode->FrameBufferSize;\r
//\r
// Allocate resource for the private mode buffer\r
//\r
//\r
// Allocate resource for the private mode buffer\r
//\r
//\r
Status = TextOut->SetMode (TextOut, BaseMode);\r
ASSERT(!EFI_ERROR(Status));\r
//\r
Status = TextOut->SetMode (TextOut, BaseMode);\r
ASSERT(!EFI_ERROR(Status));\r
PcdSet32 (PcdConOutColumn, 80);\r
PcdSet32 (PcdConOutRow, 25);\r
}\r
PcdSet32 (PcdConOutColumn, 80);\r
PcdSet32 (PcdConOutRow, 25);\r
}\r
// if GetMode is successfully and UGA device hasn't been set, set it\r
//\r
Status = ConSplitterUgaDrawSetMode (\r
// if GetMode is successfully and UGA device hasn't been set, set it\r
//\r
Status = ConSplitterUgaDrawSetMode (\r
- &Private->UgaDraw, \r
- UgaHorizontalResolution, \r
- UgaVerticalResolution, \r
- UgaColorDepth, \r
+ &Private->UgaDraw,\r
+ UgaHorizontalResolution,\r
+ UgaVerticalResolution,\r
+ UgaColorDepth,\r
UgaRefreshRate\r
);\r
}\r
UgaRefreshRate\r
);\r
}\r
//\r
if(EFI_ERROR (Status)) {\r
Status = ConSplitterUgaDrawSetMode (\r
//\r
if(EFI_ERROR (Status)) {\r
Status = ConSplitterUgaDrawSetMode (\r
- &Private->UgaDraw, \r
- 800, \r
- 600, \r
- 32, \r
+ &Private->UgaDraw,\r
+ 800,\r
+ 600,\r
+ 32,\r
\r
if (((TEXT_IN_EX_SPLITTER_NOTIFY *) NotificationHandle)->Signature != TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE) {\r
return EFI_INVALID_PARAMETER;\r
\r
if (((TEXT_IN_EX_SPLITTER_NOTIFY *) NotificationHandle)->Signature != TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE) {\r
return EFI_INVALID_PARAMETER;\r
Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);\r
\r
//\r
Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);\r
\r
//\r