Extensible Firmware Interface Specification
G-2 12/01/02 Version 1.10
if (EFI_ERROR(Status)) {
BS->Exit(ImageHandle,EFI_SUCCESS,0,NULL);
}
//
// Loop through all the handles that support
// EFI_SCSI_PASS_THRU
//
for (Index = 0; Index < NoHandles; Index++) {
//
// Get the EFI_SCSI_PASS_THRU_PROTOCOL Interface
// on each handle
//
BS->HandleProtocol(
HandleBuffer[Index],
&gEfiScsiPassThruProtocolGuid,
(VOID **)&ScsiPassThruProtocol
);
if (!EFI_ERROR(Status)) {
//
// Use the EFI_SCSI_PASS_THRU Interface to
// perform tests
//
Status = DoScsiTests(ScsiPassThruProtocol);
}
}
return EFI_SUCCESS;
}
EFI_STATUS
DoScsiTests(
EFI_SCSI_PASS_THRU _PROTOCOL *ScsiPassThruProtocol
)
{
EFI_STATUS Status;
UINT32 Target;
UINT64 Lun;
EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET Packet;
EFI_EVENT Event;