This is an addition to commit
282fe9da42e ("elflink: Use
CurrentDirName for initial PATH if valid") which tried to fix the case
when booting PXELINUX with DHCP options 209 and 210. Unfortunately,
it's not useful to play games with PATH and we really do need to chdir
to the Path Prefix before opening the config file because the config
file may be specified with a path relative to the Path Prefix.
Just do the chdir() and be done with it.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
char *last;
int tries = 8;
+ chdir(path_prefix);
if (DHCPMagic & 0x02) {
/* We got a DHCP option, try it first */
if (open_file(ConfigName, filedata) >= 0)