[syslinux] [PATCH 1/1] COMBOOT API: Add get current working directory call to most
Jeffrey Hutzelman
jhutz at cmu.edu
Sun Nov 9 16:57:10 PST 2008
--On Sunday, November 09, 2008 04:40:49 PM -0800 "H. Peter Anvin"
<hpa at zytor.com> wrote:
> Gene Cumm wrote:
>> From: Gene Cumm <gene.cumm at gmail.com>
>>
>> COMBOOT API: Add get current working directory call to most
>>
>> Signed-off-by: Gene Cumm <gene.cumm at gmail.com>
>>
>> ---
>>
>> Adds an API call to obtain the current working directory. EXTLINUX
>> will not return the correct value yet however SYSLINUX, ISOLINUX, and
>> PXELINUX will return the correct value. For the moment, EXTLINUX will
>> ONLY return "/" (null-terminated of course). In SYSLINUX and
>> ISOLINUX, it presets the CurrentDirName string to "/" for safety.
>> PXELINUX copies TFTP Prefix to CurrentDirName (minus the trailing
>> "/").
>>
>
> 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.)
I guess that depends on what it will be used for.
If the intent is for callers to concatenate the returned string with a
filename to get something they can open, then I agree.
If the intent is for the returned string to be something that can be passed
to opendir() (added in one of Gene's previous patches), then maybe not.
-- Jeff
More information about the Syslinux
mailing list