Re: Meaning of "locked" in Disk Utility
Re: Meaning of "locked" in Disk Utility
- Subject: Re: Meaning of "locked" in Disk Utility
- From: Quinn <email@hidden>
- Date: Wed, 14 May 2008 10:04:18 +0100
At 10:33 -0400 12/5/08, email@hidden wrote:
I am developing an application which must talk to a USB mass storage device
that looks like an unformatted BSD disk to the OS. On Tiger, the
/dev/rdisk? device is readable and writable (and works with my appliication
using open()/read()/write()); however, on Leopard, the device (/dev/rdisk?
And /dev/disk?) is read-only, and the Disk Utility says it's "Locked."
There certainly aren't any 'chflags' on in the /dev files, and, by the way,
the mode sense mode page looks like it says that it is NOT write-protected.
I ask about the "Locked" status because when I attached a write-protected
flash drive (one with a switch), Disk Utility also said that device was
"Locked" so it looks like there might be some relationship between "Locked"
and write-protected. Thanks for any thoughts.
My theory that Disk Arbitration thinks that the volume is write
protected. To test that theory, call DADiskCopyDescription and see
what the value of the DAMediaWritable property is. You can do this
test from the command line using FSMegaInfo.
<http://developer.apple.com/samplecode/FSMegaInfo/index.html>
For example:
$ FSMegaInfo DADiskCopyDescription /dev/disk3s2 | grep DAMediaWritable
DAMediaWritable = false
If DiskArb thinks it's write protected, you'll need to look in the
I/O Registry to see what's going on there. DiskArb typically bases
its decision on the kIOMediaWritableKey ("Writable") property of the
relevant I/O Registry node. Use <x-man-page://8/ioreg> to check on
the value of that property for your device's media.
If the I/O Registry property is set incorrectly, you're well out of
the scope of this mailing list (-: Try re-asking your question on
ata-scsi-dev.
<http://lists.apple.com/mailman/listinfo/ata-scsi-dev>
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden