Re: Disk Arbitration: Preventing the disk insertion (unrecognized volume) dialog
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Hey Ron, Dan On 15 Aug 2007, at 9:05 PM, Ron Aldrich wrote: Folks, I register a disk appeared callback to the Disk Arbitration framework. This is where things go bad. The driver creates an IOMedia object for the freshly formatted disk. My disk appeared callback gets called. So, how should I be intercepting that dialog? Thanks for your time, Ron Aldrich Software Architects, Inc. _______________________________________________ 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... You must use DADiskPeekCallback() to issue the DADiskClaim() ahead of time. I'm working on a disk formatting utility to support some specialized media and file system types, and I'm running into a bit of a problem with Disk Arbitration. I don't seem to be able to prevent the disk insertion (unrecognized volume) dialog from appearing after I issue a low-level format call to the device. Currently, I use diskutil to unmount the disk (if it was mounted - it's possible that there is unformatted media in the drive, and therefore no IOMedia object). I then ask the driver to format the media - if it had an IOMedia object, it tears it down, and formats the disk, and re-enables polling. In the disk appeared callback, I call DADiskClaim, in an attempt to prevent the unrecognized volume dialog from appearing. Apparently it's too late at this point. My diskClaimed callback gets called, the disk gets partitioned, and everything proceeds normally, except that there is an unwanted dialog on the screen. _______________________________________________ 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/markarian %40apple.com This email sent to markarian@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Dan Markarian