Re: getfsstat from disk arbitration callback
Re: getfsstat from disk arbitration callback
- Subject: Re: getfsstat from disk arbitration callback
- From: Dan Markarian <email@hidden>
- Date: Tue, 17 Jul 2007 13:57:11 -0400
Hey Ameen,
I believe DADiskAppearedCallback is the correct callback, however, you
cannot assume that the volume is already mounted. Do you see
kDADiskDescriptionVolumePathKey? Is your test case a disk image? It
is common for a disk image to be unmounted at the time of the
DADiskAppearedCallback, that is, have no
kDADiskDescriptionVolumePathKey, but immediately be mounted a moment
later. We notify you about that mount through
DADiskDescriptionChangedCallback.
Dan
On 17 Jul 2007, at 12:58 PM, Dominic Giampaolo wrote:
using getfsstat() to get the list of mounted devices in the file
system. Usign disk arbitration framework to register for volume
mount/unmount callbacks.
You are using the wrong DiskArb callback -- the DiskAppeared
callback happens when the *disk* appears, not the volumes
that are on the disk. Adding the call to sleep() makes your
code wait long enough for the volumes to mount.
It will work better if you register for a MountApproval
callback:
DARegisterDiskMountApprovalCallback(session, NULL,
volume_mounted_callback, NULL);
--dominic
_______________________________________________
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
_______________________________________________
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