/* This will allocate the return buffer from boot services pool. */
CHAR16* ConvertDevicePathToShortText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevPath, IN CONST BOOLEAN Verbose, IN CONST UINTN Length)
/* This will allocate the return buffer from boot services pool. */
CHAR16* ConvertDevicePathToShortText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevPath, IN CONST BOOLEAN Verbose, IN CONST UINTN Length)
{
  CHAR16  *Temp;
  CHAR16  *Temp2;
  UINTN   Size;
  Temp = ConvertDevicePathToText (DevPath, TRUE, TRUE);
  if (!Verbose && (Temp != NULL) && (StrLen (Temp) > Length)) {
    Temp2 = NULL;
    Size  = 0;
    Temp2 = StrnCatGrow (&Temp2, &Size, L"..", 0);
    Temp2 = StrnCatGrow (&Temp2, &Size, Temp+(StrLen (Temp) - (Length - 2)), 0);
    FreePool (Temp);
    Temp = Temp2;
  }
  return (Temp);
}