/* This function finds partitions (logical devices) in physical block devices. */
VOID FatFindPartitions(IN PEI_FAT_PRIVATE_DATA *PrivateData)
/* This function finds partitions (logical devices) in physical block devices. */
VOID FatFindPartitions(IN PEI_FAT_PRIVATE_DATA *PrivateData)
{
  BOOLEAN  Found;
  UINTN    Index;
  do {
    Found = FALSE;
    for (Index = 0; Index < PrivateData->BlockDeviceCount; Index++) {
      if (!PrivateData->BlockDevice[Index].PartitionChecked) {
        if (FatFindGptPartitions (PrivateData, Index)) {
          Found = TRUE;
          continue;
        }
        if (FatFindMbrPartitions (PrivateData, Index)) {
          Found = TRUE;
          continue;
        }
        if (FatFindEltoritoPartitions (PrivateData, Index)) {
          Found = TRUE;
          continue;
        }
      }
    }
  } while (Found && PrivateData->BlockDeviceCount <= PEI_FAT_MAX_BLOCK_DEVICE);
}