Re: varlinks!

C. Scott Ananian (cananian@lcs.mit.edu)
Thu, 30 Apr 1998 00:22:06 -0400 (EDT)


On Thu, 30 Apr 1998 R.E.Wolff@BitWizard.nl (Rogier Wolff) wrote:

> The problem here is, the "original" link is "lost" by the time we get
> to know that it is broken. The way it is now, only symlinks that have
> "${" in them are varlink-processed.

Are you sure? I would think that you could play tricks in the symlink
resolution code (fs/namei.c: lookup_dentry() ) to second-chance varlinks
in a fs-independant way.

Look at the function do_follow_link(). If inode->i_op->follow_link()
returns an error result code, then call inode->i_op->readlink() with the
same arguments and check for "${" (or whatever your magic string is).
Perform your substitutions and re-resolve at that point.
--Scott
@ @
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-oOO-(_)-OOo-=-=-=-=-=
C. Scott Ananian: cananian@lcs.mit.edu / Declare the Truth boldly and
Laboratory for Computer Science/Crypto / without hindrance.
Massachusetts Institute of Technology /META-PARRESIAS AKOLUTOS:Acts 28:31
-.-. .-.. .. ..-. ..-. --- .-. -.. ... -.-. --- - - .- -. .- -. .. .- -.
PGP key available via finger and from http://www.pdos.lcs.mit.edu/~cananian

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu