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

Symbolic links and KNOPARSE



Hi there!


I'm currently trying to implement symbolic links into tosfs.c (compatible
to the way MagiC 3 handles them). Unfortunately, I've run into a big
problem. Let's say /d/test/link is a symbolic link to a directory on a
differnt drive. When I type cd /d/test/link in the shell, everything works
fine, but when I try to cd to link when I'm in /d/test does not work ("file
not found").

So far, I've found out that this has to do with the fact that the TOS-fs is
a KNOPARSE, so tos_lookup gets a dir and a path relative to that dir.
If this is a symbolic link, what should to_lookup do? Call Fxattr to the
destination file/dir and fill that information into the file cookie? The
problem is, if tos_lookup just returns a cookie for the link, relpath2cookie
thinks this must be a directory. In the case of Dsetpath, this leads to
EPTHNF, because it sees that the path it should change to is not a dir, but
a symbolic link. Any ideas?

Btw, cd /d/test/link works because Dsetpath works with unifs then, which is
not a KNOPARSE.


Ciao

Thomas


--
/----------------------------------------------------------------------------\
| Thomas Binder (IRCNick: Gryf)                | "Quick to judge, quick to   |
| Johann-Valentin-May-Strasse 7                |  anger, slow to understand, |
| 64665 Alsbach-Haehnlein / Germany            |  ignorance, prejudice and   |
| Email: binder@rbg.informatik.th-darmstadt.de |  fear walk hand in hand."   |
| PGP-key available on request!                |                        Rush |
\----------------------------------------------------------------------------/