Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

File System Filter and Disk Eject



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:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.