Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Src/DoTestUnitReady.c
/* DoTestUnitReady.c */ |
/* |
* DoTestUnitReady.c |
* Copyright © 1992-94 Apple Computer Inc. All Rights Reserved. |
*/ |
#include "SCSISimpleSample.h" |
/* |
* Execute a Test Unit Ready command on the specified device and display |
* the result. |
*/ |
void |
DoTestUnitReady( |
DeviceIdent scsiDevice /* -> Bus/target/LUN */ |
) |
{ |
ScsiCmdBlock scsiCmdBlock; |
#define SCB (scsiCmdBlock) |
ShowSCSIBusID(scsiDevice, "\pTest Unit Ready"); |
CLEAR(SCB); |
SCB.scsiDevice = scsiDevice; |
SCB.command.scsi6.opcode = kScsiCmdTestUnitReady; |
/* All other command bytes are zero */ |
DoSCSICommandWithSense(&scsiCmdBlock, TRUE, TRUE); |
if (SCB.status == noErr) |
LOG("\pTest Unit Ready successful"); |
#undef SCB |
} |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14