Re: help needed with getmntinfo()
Re: help needed with getmntinfo()
- Subject: Re: help needed with getmntinfo()
- From: Terry Lambert <email@hidden>
- Date: Thu, 23 Apr 2009 02:08:25 -0700
On Apr 23, 2009, at 1:51 AM, rohan a wrote:
Hello all,
I have a file-system mounted on /.
But there is symbolic link to it at /Volumes/part2
ls -l /Volumes/
total 8
drwxrwxr-x 7 root admin 340 Feb 15 2008 *
lrwxr-xr-x 1 root admin 1 Apr 13 12:55 part2 -> /
drwxrwxr-t 39 root admin 1428 Feb 24 14:44 part3
Now when I run a getmtinfo() call it does not show me the /Volumes/
part2
Why is this?
Because it's not a mount point.
it's a symbolic link put there each time the system boots for the
convenience of things like the Dock, which like to find files in the
same place each time. So, for example, if you had a machine with
multiple partitions, with say Tiger installed on one of them and
Leopard on another, there will be a link in /Volumes that will point
to the currently booted systems / partition. It won't matter which
one you boot, /Volumes/Tiger/Applications/SomeProgramName will always
resolve to the program on the Tiger partition, and /Volumes/Leopard/
Applications/SomeOtherProgram will always resolve to the program on
the Leopard partition.
I need this because I would be passing the mount-point name as
argument to the getattrlist() call.
Does getmntinfo() allow some flag to be set to do this?
You don't need to know anything about /Volumes. If /Volumes is
meaningful at all, getmntinfo() will tell you. Per the man page,
getmntinfo() will return the mount point names for all the mount
points. /Volumes is irrelevant except as a well known saved path for
things which save away path names.
For the currently mounted root partition, getmntinfo() will return
"/" ...which is what it's supposed to return.
-- Terry
_______________________________________________
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