/* This function is used for getting the count of block I/O devices that one specific block driver detects. If no device is detected, then the function will return zero. */
EFI_STATUS EFIAPI NvmeBlockIoPeimGetDeviceNo2(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI *This, OUT UINTN *NumberBlockDevices)
/* This function is used for getting the count of block I/O devices that one specific block driver detects. If no device is detected, then the function will return zero. */
EFI_STATUS EFIAPI NvmeBlockIoPeimGetDeviceNo2(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_RECOVERY_BLOCK_IO2_PPI *This, OUT UINTN *NumberBlockDevices)
{
  PEI_NVME_CONTROLLER_PRIVATE_DATA  *Private;
  if ((This == NULL) || (NumberBlockDevices == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  Private             = GET_NVME_PEIM_HC_PRIVATE_DATA_FROM_THIS_BLKIO2 (This);
  *NumberBlockDevices = Private->ActiveNamespaceNum;
  return EFI_SUCCESS;
}