/* Add the image info to a deferred image list. */
VOID QueueImage(IN CONST EFI_DEVICE_PATH_PROTOCOL *ImageDevicePath, IN BOOLEAN BootOption)
/* Add the image info to a deferred image list. */
VOID QueueImage(IN CONST EFI_DEVICE_PATH_PROTOCOL *ImageDevicePath, IN BOOLEAN BootOption)
{
  DEFERRED_3RD_PARTY_IMAGE_INFO  *ImageInfo;
  ImageInfo = ReallocatePool (
                mDeferred3rdPartyImage.Count * sizeof (DEFERRED_3RD_PARTY_IMAGE_INFO),
                (mDeferred3rdPartyImage.Count + 1) * sizeof (DEFERRED_3RD_PARTY_IMAGE_INFO),
                mDeferred3rdPartyImage.ImageInfo
                );
  if (ImageInfo == NULL) {
    return;
  }
  mDeferred3rdPartyImage.ImageInfo = ImageInfo;
  ImageInfo                  = &mDeferred3rdPartyImage.ImageInfo[mDeferred3rdPartyImage.Count];
  ImageInfo->ImageDevicePath = DuplicateDevicePath (ImageDevicePath);
  if (ImageInfo->ImageDevicePath == NULL) {
    return;
  }
  ImageInfo->BootOption = BootOption;
  ImageInfo->Loaded     = FALSE;
  mDeferred3rdPartyImage.Count++;
}