File System Filter and Disk Eject
File System Filter and Disk Eject
- Subject: File System Filter and Disk Eject
- From: "Duane Murphy" <email@hidden>
- Date: Thu, 26 Jul 2007 10:34:21 -0700
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden