site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com It states: -- Terry On Jul 23, 2009, at 3:10 AM, rohan a <info1686@gmail.com> wrote: Also, can ioctl() be used in any way to send SCSI commands to devices? Hello, I am trying to learn SCSI programming on Mac OS X. While reading a document "Working with Sam" I read that only INQUIRY and TEST_UNIT_READY commands can be sent using the IO registry. Does that mean even sending SCSI Read or Write commands is not possible without writing a driver for the device? So if I need to write a backup/restore tool that backups to SCSI tape devices, will I also need to write drivers for the tape? Thanks _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/tlambert%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Did you go to <http://developer.apple.com> and read the document "SCSI Architecture Model Device Interface Guide"? "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." One of the intents if this is to allow the driver to model state for such coomands such that the state if the device is known to the driver at all times. For standard tape devices, you should not need to write your own driver; if you plug the device in, it will show up in /dev, and you can at least issue reads, writes, and standard commands, such as causing a rewind, via the device file. For non-standard commands, such as you would use to control loading and unloading tapes in a tape robot, etc., you will need to write an in-kernel driver that knows how to talk to the hardware and subclasses the more generic device (i.e. the IOKit model lets you write only the missing pieces implementing the missing control commands; you don't write a whole driver that implements read/write/etc.). On 7/23/09, rohan a <info1686@gmail.com> wrote: This email sent to tlambert@apple.com This email sent to site_archiver@lists.apple.com