/* Compare two device paths to check if they are exactly same. */
BOOLEAN EfiCompareDevicePath(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath1, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2)
/* Compare two device paths to check if they are exactly same. */
BOOLEAN EfiCompareDevicePath(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath1, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2)
{
  UINTN  Size1;
  UINTN  Size2;
  Size1 = GetDevicePathSize (DevicePath1);
  Size2 = GetDevicePathSize (DevicePath2);
  if (Size1 != Size2) {
    return FALSE;
  }
  if (CompareMem (DevicePath1, DevicePath2, Size1) != 0) {
    return FALSE;
  }
  return TRUE;
}