/* This function will output a string to the correct StdOut. */
EFI_STATUS InternalPrintTo(IN CONST CHAR16 *String)
/* This function will output a string to the correct StdOut. */
EFI_STATUS InternalPrintTo(IN CONST CHAR16 *String)
{
  UINTN  Size;
  Size = StrSize (String) - sizeof (CHAR16);
  if (Size == 0) {
    return (EFI_SUCCESS);
  }
  if (gEfiShellParametersProtocol != NULL) {
    return (gEfiShellProtocol->WriteFile (gEfiShellParametersProtocol->StdOut, &Size, (VOID *)String));
  }
  if (mEfiShellInterface          != NULL) {
    if (mEfiShellInterface->RedirArgc == 0) {
      Size /= 2;
    }
    return (mEfiShellInterface->StdOut->Write (mEfiShellInterface->StdOut, &Size, (VOID *)String));
  }
  ASSERT (FALSE);
  return (EFI_UNSUPPORTED);
}