Re: Sending SCSI commands in Mac OS X
Re: Sending SCSI commands in Mac OS X
- Subject: Re: Sending SCSI commands in Mac OS X
- From: Terry Lambert <email@hidden>
- Date: Thu, 23 Jul 2009 04:26:58 -0700
Did you go to <http://developer.apple.com> and read the document "SCSI
Architecture Model Device Interface Guide"?
It states:
"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.).
-- Terry
On Jul 23, 2009, at 3:10 AM, rohan a <email@hidden> wrote:
Also, can ioctl() be used in any way to send SCSI commands to devices?
On 7/23/09, rohan a <email@hidden> wrote:
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden