Re: How to get a vendor and product ID of a mounted flash drive?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Dec 16, 2011, at 11:12 AM, Nick wrote:
Aaron, Thanks for the response. I have asked the question in drawin-dev list either, after not getting response in usb list. My basic question was - how to get the mounting point (/Volumes/My Disk Name/) when the disk has been mounted. Disk Arbitration's DeviceAppeared callback usually gives me a DADiskRef which has a kDADiskDescriptionVolumePathKey property, which contains this mounting point. However, if the device wasn't properly ejected previously (just unplugged from the usb port), after it has been plugged in back, the callback is called without this "mounting point" property key. I can't retrieve the mounting point for each next device connection, unless it has been unmounted in a graceful way previously.
The disk appeared callback will occur for every IOMedia disk, whether it is mountable or not (e.g., the whole disk with the partition scheme, hidden partitions, etc). Just a guess, but I suspect you are receiving the disk appeared callback while the system is running fsck on the disk prior to mounting. In that case, you can also register for the description changed callback. When the system actually mounts the disk, you will receive that callback with the mount point now in the description.
The callback is being called, though, and I get DADiskRef, disregarding on how the device was ejected. I just need to get where it has been (re)mounted. Is there a way, using DA or IOKIT to get the mounting point?
_______________________________________________ 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Aaron Burghardt