AmendHub

Download

akuker

/

scsi_test

/

DoGetDriveInfo.c

 

(View History)

akuker   More files and stuff Latest amendment: 3 on 2022-08-21

1 /* DoGetDriveInfo.c */
2 /*
3 * DoGetDriveInfo.c
4 * Copyright © 1992-94 Apple Computer Inc. All Rights Reserved.
5 */
6 //#include "SCSISimpleSample.h"
7
8 #include "scsi_test.h"
9
10 /*
11 * Execute a Bus Inquiry SCSI request on the selected device. If it succeeds,
12 * display the results.
13 */
14 void
15 DoGetDriveInfo(
16 DeviceIdent scsiDevice, /* -> Bus/target/LUN */
17 Boolean noIntroMsg,
18 Boolean useAsynchManager
19 )
20 {
21
22 ScsiCmdBlock scsiCmdBlock;
23 SCSI_Inquiry_Data inquiry;
24 #define SCB (scsiCmdBlock)
25
26 if (noIntroMsg == FALSE)
27 ShowSCSIBusID(scsiDevice, "\pGet Drive Info");
28 CLEAR(SCB);
29 SCB.scsiDevice = scsiDevice;
30 SCB.command.scsi6.opcode = kScsiCmdInquiry;
31 SCB.command.scsi6.len = sizeof inquiry;
32 SCB.bufferPtr = (Ptr) &inquiry;
33 SCB.transferSize = sizeof inquiry;
34 SCB.transferQuantum = 1; /* Force handshake */
35 /* All other command bytes are zero */
36 DoSCSICommandWithSense(&scsiCmdBlock, TRUE, useAsynchManager);
37 if (SCB.status == noErr)
38 DoShowInquiry(scsiDevice, &inquiry);
39 #undef SCB
40 }
41
42