/* Converts a text device path node to File device path structure. */
EFI_DEVICE_PATH_PROTOCOL* DevPathFromTextFilePath(CHAR16 *TextDeviceNode)
/* Converts a text device path node to File device path structure. */
EFI_DEVICE_PATH_PROTOCOL* DevPathFromTextFilePath(CHAR16 *TextDeviceNode)
{
  FILEPATH_DEVICE_PATH  *File;
  File = (FILEPATH_DEVICE_PATH *) CreateDeviceNode (
                                    MEDIA_DEVICE_PATH,
                                    MEDIA_FILEPATH_DP,
                                    (UINT16) (sizeof (FILEPATH_DEVICE_PATH) + StrLen (TextDeviceNode) * 2)
                                    );
  StrCpyS (File->PathName, StrLen (TextDeviceNode) + 1, TextDeviceNode);
  return (EFI_DEVICE_PATH_PROTOCOL *) File;
}