aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/readconfig.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-03-13 10:06:59 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-03-23 16:56:16 +0000
commitdb63acbdcd3603bbd42238dac19902ce00fe5d59 (patch)
tree5415bacab1d691d713e6c694d3a68cb834203443 /com32/elflink/ldlinux/readconfig.c
parent3dfe95eb4c8729d479043710a9f43456a2f6bf1d (diff)
downloadsyslinux-db63acbdcd3603bbd42238dac19902ce00fe5d59.tar.gz
syslinux-db63acbdcd3603bbd42238dac19902ce00fe5d59.tar.xz
syslinux-db63acbdcd3603bbd42238dac19902ce00fe5d59.zip
ldlinux: chdir to the APPEND str when parsing a CONFIG directive
If an APPEND directive was specified for a CONFIG label then we need to chdir to that directory after parsing the new config file. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/readconfig.c')
-rw-r--r--com32/elflink/ldlinux/readconfig.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index 564cbeff..573d7246 100644
--- a/com32/elflink/ldlinux/readconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -1345,6 +1345,11 @@ static int parse_one_config(const char *filename)
f = fdopen(fd, mode);
parse_config_file(f);
+ if (config_cwd[0]) {
+ chdir(config_cwd);
+ config_cwd[0] = NULL;
+ }
+
return 0;
}