[syslinux] [PATCH 1/1] COMBOOT API: Add get current working directory call to most

Gene Cumm gene.cumm at gmail.com
Mon Nov 10 10:09:29 PST 2008


On Mon, Nov 10, 2008 at 10:35 AM, H. Peter Anvin <hpa at zytor.com> wrote:
>
> That is correct, because PXELINUX doesn't know -- and doesn't have any
> way of knowing -- what directory separator the TFTP server uses.
>

The only chance would be if the TFTP prefix were to include a
directory separator _and_ the administrator of the server handing out
the file name (DHCP or otherwise) configured it to correspond with the
desired behavior for the TFTP server.  This still leaves it at a lot
of assumption that the PXE environment is configured properly, which
could be a valid assumption.

On the flip side, PXELINUX does assume that it can use "/" when trying
to find the configuration.  But, this could be interpreted by the TFTP
server as either a directory separator or as a normal file name
character (if there is any OS that _might_ do this.  I don't know of
one.  DOS/WIndows does not.  Unix-like would of course use it as a
directory separator.) and still be able to use PXELINUX.  I know that
the TFTP server I use (atftpd on a Linux platform) doesn't like using
"\" as a directory separator.  I tried it just to see how it would
behave(manaually requesting a file and watching data in Wireshark).

>>
>> Didn't know that opendir() normally doesn't care about the trailing
>> "/".  Having the trailing "/" (or whatever characters it is) would
>> make appending the current dir to a file name easier.
>>
>
> In Unix, a trailing "/" in a pathname is the same thing as a trailing
> "/." -- it means the last component has to be a directory, but that is
> obvious anyway for opendir().
>
>        -hpa
>

Makes sense.  Thanks.




More information about the Syslinux mailing list