On Sun, May 19, 2002 at 05:27:47PM +0000, J. Mallett wrote:
> On Sun, May 19, 2002 at 06:56:40PM +0200, Bernd Walter wrote:
> > > I'm ``blindly'' using the only answer we have to a question: how can I get
> > > an absolute (thus unique) path to an object in the filesystem.
> > 
> > Forget it - it's not possible with FreeBSD (see below).
> > I'm just a bit frustrated about all the brokenness with softlink
> > handling I saw,  without noticing that FreeBSD doesn't give you a
> > chance to do it right.
> I really doubt there isn't a way to do it right somehow, stuff like this
> has been around forever.  Consider how extensively @sys expansion was relied
> on by AFS, and so on.  You just have to hide the physical path somehow.

Hidding the physical Path is difficult to be done right.
If getcwd would return the logical path things would be much easier.

> > > I'm open to alternative ways of doing that, especially as I described
> > > canonpath(3) above.
> > 
> > After some digging it seems like it's worse.
> > getcwd already returns a canonical path on FreeBSD, NetBSD and Solaris.
> > Only HP-UX returns the accumulated chdir path.
> > Very dissapointing.

After rechecking getcwd on HP-UX also returns the physical path.
I tested on that machine only with pwd...
Which is aliased to echo $cwd - damn uni acounts...
Maybe I have just a wrong view on that issue and softlinks have never
been worked that way.

> Look at getcwd_logical() in pwd.c

Aha - but that does mean trusting $PWD.

B.Walter              COSMO-Project         http://www.cosmo-project.de
[EMAIL PROTECTED]         Usergroup           [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to