Re: Disk Arbitration: Preventing the disk insertion (unrecognized volume) dialog
Re: Disk Arbitration: Preventing the disk insertion (unrecognized volume) dialog
- Subject: Re: Disk Arbitration: Preventing the disk insertion (unrecognized volume) dialog
- From: Ron Aldrich <email@hidden>
- Date: Thu, 16 Aug 2007 13:39:52 -0700
Thanks, Dan.
That's solved it.
I have to agree with the other folks who say that "minimal" is about
the most polite description they can come up with for the state of
the documentation for the Disk Arbitration framework, and while the
source code to disktool is a useful example, it does appear to use a
lot of private, or at least deprecated APIs (although, it may be that
I just need newer source).
Hopefully the copy of "Mac OS X Internals: A Systems Approach" I just
ordered from Amazon will shed better light on the APIs.
Best Regards,
Ron Aldrich
Software Architects, Inc.
On Aug 16, 2007, at 7:26 AM, Dan Markarian wrote:
Hey Ron,
You must use DADiskPeekCallback() to issue the DADiskClaim() ahead
of time.
Dan
On 15 Aug 2007, at 9:05 PM, Ron Aldrich wrote:
Folks,
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 register a disk appeared callback to the Disk Arbitration
framework.
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.
This is where things go bad.
The driver creates an IOMedia object for the freshly formatted disk.
My disk appeared callback gets called.
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.
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 (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