/* Allow the caller to discover a specific SMBIOS entry, and patch it if necissary. */
SMBIOS_STRUCTURE* EFIAPI SmbiosLibGetRecord(IN EFI_SMBIOS_TYPE Type, IN UINTN Instance, OUT EFI_SMBIOS_HANDLE *SmbiosHandle)
/* Allow the caller to discover a specific SMBIOS entry, and patch it if necissary. */
SMBIOS_STRUCTURE* EFIAPI SmbiosLibGetRecord(IN EFI_SMBIOS_TYPE Type, IN UINTN Instance, OUT EFI_SMBIOS_HANDLE *SmbiosHandle)
{
  EFI_STATUS               Status;
  EFI_SMBIOS_TABLE_HEADER  *Record;
  UINTN                    Match;
  Match         = 0;
  *SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
  do {
    Status = gSmbios->GetNext (gSmbios, SmbiosHandle, &Type, &Record, NULL);
    if (!EFI_ERROR (Status)) {
      if (Match == Instance) {
        return (SMBIOS_STRUCTURE *)Record;
      }
      Match++;
    }
  } while (!EFI_ERROR (Status));
  return NULL;
}