Re: Updating volumes in Finder on mount/unmount in Leopard
Re: Updating volumes in Finder on mount/unmount in Leopard
- Subject: Re: Updating volumes in Finder on mount/unmount in Leopard
- From: Quinn <email@hidden>
- Date: Thu, 15 Nov 2007 12:00:00 +0000
At 19:26 +0200 14/11/07, Rusi Rusev wrote:
What should a FS support in Leopard so that the volumes are
correctly shown in Finder? Is there some documentation about FS
bundles in Leopard and are they enough if the FS is a local one? And
what about the network ones? Any information will be highly
appreciated because we are stuck on this issue.
Mac OS X only really supports local and network file systems (per the
definition in <http://developer.apple.com/qa/qa2001/qa1242.html>).
If you're developing a cluster file system, you have to choose to
emulate one or the other.
Many cluster file system developers choose to look like a network
file system. In that case you're largely responsible for managing
the mount and unmount process. Specifically, you have to do specific
magic to get your volume to show up on the desktop. This magic is
documented in DTS Q&A 1491 "Volumes Not Showing Up On The Desktop".
<http://developer.apple.com/qa/qa2006/qa1491.html>
If you're a network file system, you must not set MNT_LOCAL and there
are no significant constraints on the value you returned by
<x-man-page://2/statfs> for f_mntfromname.
If you're a local file system mounting is automatically handled by
DiskArb. DiskArb watches for media objects showing up in the I/O Kit
I/O registry. It then tries to probe each volume using information
from the file system bundles in "/System/Library/Filesystems". Once
it's decided to mount the volume, it calls the appropriate mount tool.
A local file system must set MNT_LOCAL and the value returned by
<x-man-page://2/statfs> for f_mntfromname is always the path to the
block device on which the file system is mounted. In the case of the
latter, if you can't come up with a good value to return, you
probably want to look like a network file system instead.
For a comprehensive example of how to create a filesystem bundle,
check out DTS sample code "MFSLives".
<http://developer.apple.com/samplecode/MFSLives/index.html>
There no good documentation on this stuff. Feel free to file bugs
about the missing documentation.
<http://developer.apple.com/bugreporter/>
Finally, there are two gotchas in Leopard that I've recently discovered:
o For a network file system, you no longer need to call
DiskArbDiskAppearedWithMountpointPing_auto because DiskArb will
detect new volumes showing up by way of a kernel notification.
However, DiskArb will ignore volumes that set MNT_AUTOMOUNTED. If
you want your volume to be known to DiskArb, and hence to the
CoreServices File Manager, you must not set this flag.
btw If you want your volume to be known to File Manager but /not/ to
show up on the desktop, leave MNT_AUTOMOUNTED clear and set
MNT_DONTBROWSE.
o The Leopard Finder has a preference (Finder > Preferences >
General > Show these items on the Desktop > Connected servers) that
controls whether network volumes show up on the desktop. It defaults
to off. Check that this isn't the only reason you're volume is MIA.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden