From 04b9f7631327ef09701b9ff7a86d53fa51a70b50 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Wed, 17 Sep 2008 09:55:05 +0000 Subject: Fixed one bug in consplitter console input Start/Stop functions for those handlers only produce SimpleTextIn and not produce SimpleTextEx protocol. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5914 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Console/ConPlatformDxe/ComponentName.c | 5 --- .../Universal/Console/ConSplitterDxe/ConSplitter.c | 39 ++++++++++------------ 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c b/MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c index 8dfd8d8ac7..a9b268f441 100644 --- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c @@ -12,11 +12,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -// -// Include common header file for this module. -// - - #include // diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index db9f24524b..91b540a399 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -1094,15 +1094,14 @@ ConSplitterConInDriverBindingStart ( mConIn.VirtualHandle, EFI_OPEN_PROTOCOL_GET_PROTOCOL ); - if (EFI_ERROR (Status)) { - return Status; + if (!EFI_ERROR (Status)) { + // + // If Simple Text Input Ex protocol exists, + // add this device into Text In Ex devices list. + // + Status = ConSplitterTextInExAddDevice (&mConIn, TextInEx); } - // - // Add this device into Text In Ex devices list. - // - Status = ConSplitterTextInExAddDevice (&mConIn, TextInEx); - return Status; } @@ -1455,10 +1454,10 @@ ConSplitterConInDriverBindingStop ( IN EFI_HANDLE *ChildHandleBuffer ) { - EFI_STATUS Status; - EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn; - + EFI_STATUS Status; + EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn; EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx; + if (NumberOfChildren == 0) { return EFI_SUCCESS; } @@ -1471,19 +1470,17 @@ ConSplitterConInDriverBindingStop ( ControllerHandle, EFI_OPEN_PROTOCOL_GET_PROTOCOL ); - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Remove device from Text Input Ex devices list. - // - Status = ConSplitterTextInExDeleteDevice (&mConIn, TextInEx); - if (EFI_ERROR (Status)) { - return Status; + if (!EFI_ERROR (Status)) { + // + // If Simple Text Input Ex protocol exists, + // remove device from Text Input Ex devices list. + // + Status = ConSplitterTextInExDeleteDevice (&mConIn, TextInEx); + if (EFI_ERROR (Status)) { + return Status; + } } - // // Close Simple Text In protocol on controller handle and virtual handle. // -- cgit v1.2.3