/* Check sense key to find if it has sense key. */
BOOLEAN ScsiDiskHaveSenseKey(IN EFI_SCSI_SENSE_DATA *SenseData, IN UINTN SenseCounts)
/* Check sense key to find if it has sense key. */
BOOLEAN ScsiDiskHaveSenseKey(IN EFI_SCSI_SENSE_DATA *SenseData, IN UINTN SenseCounts)
{
  EFI_SCSI_SENSE_DATA  *SensePtr;
  UINTN                Index;
  BOOLEAN              HaveSenseKey;
  if (SenseCounts == 0) {
    HaveSenseKey = FALSE;
  } else {
    HaveSenseKey = TRUE;
  }
  SensePtr = SenseData;
  for (Index = 0; Index < SenseCounts; Index++) {
    if ((SensePtr->Sense_Key == EFI_SCSI_SK_NO_SENSE) &&
        (Index == 0))
    {
      HaveSenseKey = FALSE;
    }
    SensePtr++;
  }
  return HaveSenseKey;
}