aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-02-13 12:34:52 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-02-13 12:34:52 +0000
commitbf8ffe81f7247de7582cc23722212b7d5f795e52 (patch)
treeded1b6260b4b56c532b6a707c0c655db14827354
parent88f8ad6a7721a7c1dcb5fc756906f8ccd90f6cfe (diff)
downloadsyslinux-bf8ffe81f7247de7582cc23722212b7d5f795e52.tar.gz
syslinux-bf8ffe81f7247de7582cc23722212b7d5f795e52.tar.xz
syslinux-bf8ffe81f7247de7582cc23722212b7d5f795e52.zip
pxe: chdir to Path Prefix (DHCP Option 210) to open configsyslinux-5.02-pre2
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>
-rw-r--r--core/fs/pxe/pxe.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index ae44cffe..f96c6d06 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -1065,6 +1065,7 @@ static int pxe_open_config(struct com32_filedata *filedata)
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)