/* Add Text Input Device in Consplitter Text Input list. */
EFI_STATUS ConSplitterTextInAddDevice(IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn)
/* Add Text Input Device in Consplitter Text Input list. */
EFI_STATUS ConSplitterTextInAddDevice(IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn)
{
  EFI_STATUS  Status;
  if (Private->CurrentNumberOfConsoles >= Private->TextInListCount) {
    Status = ConSplitterGrowBuffer (
               sizeof (EFI_SIMPLE_TEXT_INPUT_PROTOCOL *),
               &Private->TextInListCount,
               (VOID **)&Private->TextInList
               );
    if (EFI_ERROR (Status)) {
      return EFI_OUT_OF_RESOURCES;
    }
  }
  Private->TextInList[Private->CurrentNumberOfConsoles] = TextIn;
  Private->CurrentNumberOfConsoles++;
  gBS->CheckEvent (TextIn->WaitForKey);
  return EFI_SUCCESS;
}