• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: DiskArb DiskChangedCallback bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DiskArb DiskChangedCallback bug?


  • Subject: Re: DiskArb DiskChangedCallback bug?
  • From: Dan Markarian <email@hidden>
  • Date: Mon, 12 Jun 2006 14:40:51 -0400

Hi Brian,

DADiskDescriptionChangedCallback does notify you when a property of a disk has changed, including whether it is mounted or not, however, it does not notify you of the existence of the disk. You must also subscribe to DADiskAppearedCallback and DADiskDisappearedCallback. It is possible that a disk is already mounted when we tell you of its existence.

Dan

Le 12 Jun 2006 à 1:58 PM, Brian Bergstrand a écrit :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Jun 12, 2006, at 12:49 PM, Chris Sarcone wrote:

Brian --

Nevermind. I was looking at the wrong API.

As for using DARegisterDiskDescriptionChangedCallback() for mounts, I think that's incorrect. DARegisterDiskDescriptionChangedCallback() is meant to track disk that are already mounted and changing either their name or path. I think your really want DARegisterDiskAppearedCallback().


Hmm, won't that be called when the disk appears in IOKit and not when it's mounted? I don't really care about the former. Or will it be called both for attach and mount? If that's the case, then I could use the volumePath key in the Disk dictionary to determine if it's being mounted.


Also, if ChangedCallback() is not supposed to be used, then the documentation should be clarified:

/*!
* @constant kDADiskDescriptionWatchVolumePath
* Predefined CFArray object containing a set of disk description keys appropriate for
* watching volume mount changes using DARegisterDiskDescriptionChangedCallback().
*/


extern CFArrayRef kDADiskDescriptionWatchVolumePath;

I take "watching volume mount changes", to mean changing from mounted - -> unmounted OR vise-versa. "watching volume un-mounts" would be a better term if that is all ChangedCallback does.

Thanks for the quick response!


-- Chris


On Jun 12, 2006, at 10:42 AM, Chris Sarcone wrote:

Brian --

DARegisterDiskDescriptionChangedCallback(daSession, NULL, kDADiskDescriptionWatchVolumePath,
DiskArbCallback_ChangeNotification, NULL);

The third argument is supposed to be a CFArrayRef of keys to watch, not a CFDictionaryRef. You might want to try fixing that, then retest...







-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin)

iD8DBQFEjatIedHYW7bHtqIRAjrnAKDueVlFzcor+NdyG0haXVfsaWMVjwCcCqbv
hDuY/92TfgL7KQWq9/yEUqo=
=yBfx
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com


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
  • Follow-Ups:
    • Re: DiskArb DiskChangedCallback bug?
      • From: Brian Bergstrand <email@hidden>
References: 
 >DiskArb DiskChangedCallback bug? (From: Brian Bergstrand <email@hidden>)
 >Re: DiskArb DiskChangedCallback bug? (From: Chris Sarcone <email@hidden>)
 >Re: DiskArb DiskChangedCallback bug? (From: Chris Sarcone <email@hidden>)
 >Re: DiskArb DiskChangedCallback bug? (From: Brian Bergstrand <email@hidden>)

  • Prev by Date: Re: kqueue - supported filesystems?
  • Next by Date: Re: DiskArb DiskChangedCallback bug?
  • Previous by thread: Re: DiskArb DiskChangedCallback bug?
  • Next by thread: Re: DiskArb DiskChangedCallback bug?
  • Index(es):
    • Date
    • Thread