[syslinux] [PATCH 1/1] COMBOOT API: Add get current working directory call to most
H. Peter Anvin
hpa at zytor.com
Mon Nov 10 07:35:19 PST 2008
Gene Cumm wrote:
> On Sun, Nov 9, 2008 at 8:21 PM, H. Peter Anvin <hpa at zytor.com> wrote:
>> Jeffrey Hutzelman wrote:
>>>> Okay, this isn't quite right, especially in the case of the TFTP prefix;
>>>> the TFTP prefix may not end in '/', especially when the TFTP server is
>>>> not a Unix system. Therefore I think this call should return a prefix
>>>> (including a final '/' in case of the filesystem-based variants.)
>
> Alright. Good to know. I also just thought of the fact that I made
> at least one more mistake in that if the prefix is "/", it will set it
> to "". Should it just be the TFTP Prefix? It looks like PXELINUX
> doesn't change the directory separator and leaves it up to the TFTP
> server to deal with it.
>
That is correct, because PXELINUX doesn't know -- and doesn't have any
way of knowing -- what directory separator the TFTP server uses.
>
> 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
More information about the Syslinux
mailing list