bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm patch suggestion


From: Niels Möller
Subject: Re: rm patch suggestion
Date: 09 May 2002 10:50:00 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

tb@becket.net (Thomas Bushnell, BSG) writes:

> As it sits now, the that lookup (".", O_NOTRANS) gives you the node
> itself, and lookup (".", 0) starts the translator and gives you its
> root.

And if CWDIR is the translated node, then lookup (".", O_NOTRANS)
gives you the underlying node, and it's lookup(".", 0) gives you the
node itself. Correct? So there's no lookup call that gives you the
node itself in both cases.

> You suggest "O_TRANS", but there is no such flag, and in fact, that's
> the default for all other lookups, right?  So it should be the default
> for all names.

One could have flags == 0 mean "follow translators, except for .
and ..", O_NOTRANS mean "never follow translators", and O_TRANS mean
"always follow translators, even for . and ..". Then O_TRANS and
O_NOTRANS would be different (although mutually exclusive) bits.

> "foo/.." should be the same as ".", even if foo is a translated node.

But for the general case, that's simply not true!? Consider

  settrans foo /hurd/symlink /somewhere/else

Then "foo/.." gets you to "/somewhere". Translators have the freedom
to violate the "foo/.." == "." principle, and one can't know before
hand how a random translator will behave.

I think my main point is that I question the utility of direct links
between a node and it's underlying node. Can you give any example of
operations that really need to be able to do that, without going via
the parent directory? And if the links are really needed, I think the
links should have a different name than ".".

/Niels



reply via email to

[Prev in Thread] Current Thread [Next in Thread]