/* DevicePathNode must be Mac Address type and this will populate the MappingItem. */
EFI_STATUS DevPathSerialMacAddr(IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
/* DevicePathNode must be Mac Address type and this will populate the MappingItem. */
EFI_STATUS DevPathSerialMacAddr(IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
{
  MAC_ADDR_DEVICE_PATH  *Mac;
  UINTN                 HwAddressSize;
  UINTN                 Index;
  CHAR16                Buffer[64];
  CHAR16                *PBuffer;
  ASSERT (DevicePathNode != NULL);
  ASSERT (MappingItem != NULL);
  Mac = (MAC_ADDR_DEVICE_PATH *)DevicePathNode;
  HwAddressSize = sizeof (EFI_MAC_ADDRESS);
  if ((Mac->IfType == 0x01) || (Mac->IfType == 0x00)) {
    HwAddressSize = 6;
  }
  for (Index = 0, PBuffer = Buffer; Index < HwAddressSize; Index++, PBuffer += 2) {
    UnicodeSPrint (PBuffer, 0, L"%02x", (UINTN)Mac->MacAddress.Addr[Index]);
  }
  return AppendCSDStr (MappingItem, Buffer);
}