/* Fetches the number of handles of the specified SMBIOS type. */
STATIC UINTN GetHandleCount(IN UINT8 SmbiosType)
/* Fetches the number of handles of the specified SMBIOS type. */
STATIC UINTN GetHandleCount(IN UINT8 SmbiosType)
{
  UINTN                    HandleCount;
  EFI_STATUS               Status;
  EFI_SMBIOS_HANDLE        SmbiosHandle;
  EFI_SMBIOS_TABLE_HEADER  *Record;
  HandleCount = 0;
  do {
    Status = mSmbiosMiscSmbios->GetNext (
                                  mSmbiosMiscSmbios,
                                  &SmbiosHandle,
                                  &SmbiosType,
                                  &Record,
                                  NULL
                                  );
    if (Status == EFI_SUCCESS) {
      HandleCount++;
    }
  } while (!EFI_ERROR (Status));
  return HandleCount;
}