/* Converts a text device path node to UART Flow Control device path structure. */
EFI_DEVICE_PATH_PROTOCOL* DevPathFromTextUartFlowCtrl(CHAR16 *TextDeviceNode)
/* Converts a text device path node to UART Flow Control device path structure. */
EFI_DEVICE_PATH_PROTOCOL* DevPathFromTextUartFlowCtrl(CHAR16 *TextDeviceNode)
{
  CHAR16                        *ValueStr;
  UART_FLOW_CONTROL_DEVICE_PATH *UartFlowControl;
  ValueStr        = GetNextParamStr (&TextDeviceNode);
  UartFlowControl = (UART_FLOW_CONTROL_DEVICE_PATH *) CreateDeviceNode (
                                                        MESSAGING_DEVICE_PATH,
                                                        MSG_VENDOR_DP,
                                                        (UINT16) sizeof (UART_FLOW_CONTROL_DEVICE_PATH)
                                                        );
  CopyGuid (&UartFlowControl->Guid, &gEfiUartDevicePathGuid);
  if (StrCmp (ValueStr, L"XonXoff") == 0) {
    UartFlowControl->FlowControlMap = 2;
  } else if (StrCmp (ValueStr, L"Hardware") == 0) {
    UartFlowControl->FlowControlMap = 1;
  } else {
    UartFlowControl->FlowControlMap = 0;
  }
  return (EFI_DEVICE_PATH_PROTOCOL *) UartFlowControl;
}