/* This function converts an input device structure to a Unicode string. */
CHAR16* BmDevicePathToStr(IN EFI_DEVICE_PATH_PROTOCOL *DevPath)
/* This function converts an input device structure to a Unicode string. */
CHAR16* BmDevicePathToStr(IN EFI_DEVICE_PATH_PROTOCOL *DevPath)
{
  EFI_STATUS                        Status;
  CHAR16                            *ToText;
  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevPathToText;
  if (DevPath == NULL) {
    return NULL;
  }
  Status = gBS->LocateProtocol (
                  &gEfiDevicePathToTextProtocolGuid,
                  NULL,
                  (VOID **)&DevPathToText
                  );
  ASSERT_EFI_ERROR (Status);
  ToText = DevPathToText->ConvertDevicePathToText (
                            DevPath,
                            FALSE,
                            TRUE
                            );
  ASSERT (ToText != NULL);
  return ToText;
}