Re: help needed with getmntinfo()
Re: help needed with getmntinfo()
- Subject: Re: help needed with getmntinfo()
- From: Steve Checkoway <email@hidden>
- Date: Thu, 23 Apr 2009 04:32:44 -0700
On Apr 23, 2009, at 4:18 AM, Terry Lambert wrote:
If you absolutely have to go though /Volumes for some bizarre and
unexplainable reason, then you will need to lstat the path, see that
it's a symbolic link, and use readlink(2) to read the link target,
then use the link target as the path instead, internally. Of course
it might be a relative path, and it might have . or .. in it, and if
so, you will have to start with the dirname(3) and recompite the
path as an absolute path before calling getattrlist() to make sure
it fits in PATH_MAX characters. Of course going that route you could
need to write a lot of code to handle complicated paths, like
subtracting a path component when you see ../, or simply dropping ".".
realpath(3)? Seems easier than reinventing the wheel but harder than
just using getmntinfo(3).
--
Steve Checkoway
"Anyone who says that the solution is to educate the users
hasn't ever met an actual user." -- Bruce Schneier
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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