TFTP driver changes

Till Straumann strauman at SLAC.Stanford.EDU
Wed Sep 26 18:54:25 UTC 2001

Eric Norum wrote:

> Till Straumann wrote:
> >
> > Simple: tftp_eval_path() checks the node argument's fileops. If they are TFTPfs',
> > the CWD is already on TFTPfs and hence node_access holds the necessary
> > path prefix :-)
> >
> But I still don't see how I can tell if the incoming path is absolute or
> relative.
> e.g.
> chdir ("/TFTP/somehereville/");
> results in "somewhereville/" being passed to tftp_eval_path().
> chdir ("somewhereville/");
> results in "somewhereville/" being passed to tftp_eval_path().
> How can tftp_eval_path() decide which of these is relative and which is
> absolute?  They look pretty similar to me :-)

The path name looks indeed the same but the node argument does not.
In the first case it's the root node and therefore the node's fileops point to
IMFS' fileops. In the relative case, the node is the CWD which could be
on TFTPfs and hence the proposed fileops test.

-- Till.

More information about the users mailing list