Re: Filesystem bundles
Re: Filesystem bundles
- Subject: Re: Filesystem bundles
- From: Quinn <email@hidden>
- Date: Mon, 25 Sep 2006 09:18:45 +0100
At 11:57 -0700 22/9/06, Michael Welch wrote:
I've seen some indication that I need a bundle in
/System/Library/Filesystems to make this happen - but I can't find
anything describing what that bundle should contain, and all of the
pre-existing ones seem different from eachother.
This is not yet documented. The master bug report covering the
absence of VFS documentation is <rdar://problem/4445951>.
A file system bundle /is/ the right solution if you're developing a
local file system. DiskArb will consult these file system bundles as
it probes for file systems to mount any new local disks that appear.
However, the story is very different for network file systems.
Ideally a network file system should be implemented as a URLMount
framework plug-in. However, this plug-in architecture is not
supported for third party use (and is apparently pretty broken
anyway). This is <rdar://problem/3502170>.
To make your network file system known to DiskArb, and hence to other
apps on the system, like the Finder, you'll have to call DiskArb
explicitly. Once you've mounted the volume (using any of the
standard techniques, like <x-man-page://2/mount> or
<x-man-page://8/mount>), you can get it to appear on the desktop by
calling the DiskArbitration routine
DiskArbDiskAppearedWithMountpointPing_auto. Unfortunately, this
routine isn't part of the standard DiskArbitration framework headers,
so you have to declare your own prototype for it. Here's the
prototype below:
extern kern_return_t DiskArbDiskAppearedWithMountpointPing_auto(
char * disk,
unsigned reserved0032,
char * mountpoint
);
where:
o disk is the device on which the disk is mounted (in the case of a
network volume, you pretty much make this up; however, it should
mount the f_mntfromname returned by statfs)
o reserved0032 is kDiskArbDiskAppearedNetworkDiskMask (see below)
o mountpoint is the place where the disk is mounted
enum
{
kDiskArbDiskAppearedNetworkDiskMask = 1 << 3
};
This routine is part of the old (pre 10.3), private, DiskArbitration
framework API. When we introduced a new, public DiskArbitration API
in Mac OS X 10.3, we didn't introduce a replacement for this routine
because, in the long term, DiskArbitration will automatically pick up
mounts by way of a kernel notification. So, ultimately, you won't
need to call this routine for your volume to appear on the desktop.
For that reason, I strongly recommend that you weak link against this
symbol and, if it's not present, just don't call it.
Share and Enjoy
--
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.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden