user663896
user663896

Reputation:

Sending a specific SCSI command to a SCSI device in Mac OS X

Is it possible to do some Inquiry requests to SCSI driver?

Upvotes: 2

Views: 2664

Answers (2)

Thomas Tempelmann
Thomas Tempelmann

Reputation: 12043

The accepted answer is not entirely correct.

If the device is not a block disk device but, for instance, a tape drive, and therefore is not driven by a macOS driver by default, then one can talk to it using the functions available in <IOKit/scsi/SCSITaskLib.h>, from a userland application. See the "SCSITaskDeviceInterface" section in Apple's SCSI docs.

Upvotes: 1

user663896
user663896

Reputation:

No it is not possible from userland.

By design, Mac OS X does not allow applications to send SCSI or ATA commands to storage devices unless the application developer also provides an in-kernel device driver that supports the commands. The SCSI Architecture Model family allows only one logical unit driver to control a device at a time and provides in-kernel logical unit drivers for storage devices (as listed in “SCSI Architecture Model Family Device Support”). Similarly, the ATA family does not allow applications to send ATA commands directly to ATA or SATA (Serial ATA) devices.

From here http://developer.apple.com/library/mac/#documentation/DeviceDrivers/Conceptual/WorkingWithSAM/WWS_SAMDevInt/WWS_SAM_DevInt.html

Upvotes: 2

Related Questions