Re: File System Filter and Disk Eject
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com I need to stop answering my own questions. Silly me, the answer is handleClose(). ...Duane --- At Thu, 26 Jul 2007 10:34:21 -0700, Duane Murphy wrote:
Hell Folks, I'm working on a file system filter kext. The kext fails to unload and the disk it is attached to fails to completely eject. By completely eject, I mean that the volume is removed from the Finders desktop, but disk utility still shows the disk and the volume grayed out. (The volume can even be remounted.) Selecting the disk in disk utility and selecting Eject gives an error message indicating open resources.
For various reasons, the kext keeps an open connection (using open()) to it's provider. If that connection is closed then the disk can be ejected. Clearly I'm at fault here, so I am looking for suggestions.
Note that if the disk is removed (ie a flash drive), the kext cleans up and is removed because I override willTerminate() to clean up. Clearly this is too late.
I'd like to find out what I can do to determine that the disk is trying to be ejected so that I can clean up and remove my connection. I have no problem removing the connection, I just need to know when.
I've looked at the terminate chain (terminate, requestTerminate, willTerminate, terminateClient) but those are too late. They seem to be called when the media is removed and you have no choice.
Thanks for your suggestions.
...Duane _______________________________________________ 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Duane Murphy