Re: How to identify the server from which a volume was mounted?
Re: How to identify the server from which a volume was mounted?
- Subject: Re: How to identify the server from which a volume was mounted?
- From: Quinn <email@hidden>
- Date: Thu, 2 Jul 2009 09:11:01 +0100
At 5:16 -0700 1/7/09, Jerry Krinock wrote:
How can I get the server name, to display to the user?
There's no really good way to do this. The server name, as returned
by GetAliasInfo, only really applies to AppleShare servers. Other
server types don't necessarily support this name in any meaningful
way.
Generally I'd recommend you get the server URL using
FSCopyURLForVolume and proceed from there.
P.S. Again, if Alias Manager can't, maybe statfs(2) can do this.
If I call statfs() upon a file on an afp volume, the mntfromname
field of the returned struct is a C string, for example:
afp_2lZ2Za000bB10000oM0000VU-1.2e00002e
I'd bet that those characters would identify the server if someone
could explain how to decode it.
Nah, don't go there. For non-local volumes the format of the
mntfromname string is complete private to the VFS plug-in. If you
mount an SMB server, you'll see a completely different format.
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.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden