Re: How to get a vendor and product ID of a mounted flash drive?
Re: How to get a vendor and product ID of a mounted flash drive?
- Subject: Re: How to get a vendor and product ID of a mounted flash drive?
- From: Aaron Burghardt <email@hidden>
- Date: Fri, 16 Dec 2011 11:29:31 -0500
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden