summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Herbszt <herbszt@gmx.de>2008-07-09 21:02:39 +0200
committerH. Peter Anvin <hpa@zytor.com>2008-07-09 15:53:53 -0400
commitb744336fe766536b7d7a8e5bb6d02f4f49086c9b (patch)
tree0c725a435bd5d8a0d6ef5a803a4c1616d14e2c3d
parent83f9a99bc50b68a4e7f977e9b2510206f6158319 (diff)
downloadsyslinux-b744336fe766536b7d7a8e5bb6d02f4f49086c9b.tar.gz
ldlinux: CurrentDir not set if syslinux.cfg is missing
If a syslinux floppy does not contain a config file (syslinux.cfg) modules are not being found unless specified with a directory prefix (e.g. /pcitest.c32). The reason is that CurrentDir is only set if there is a config file present. This is a possible regression since commit 68eefb79e2cbb590ebf958dd0c50ce00b941abd2. Before this change RootDir was used in searchdir and now it's CurrentDir unless the filename starts with '/'. Possible fix is to set CurrentDir to RootDir if no config file is found. Actually it seems better to move this to the top of the "check for config file" block. Initialize CurrentDir to RootDir and change it if a config file is found. - Sebastian
-rw-r--r--core/ldlinux.asm2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/ldlinux.asm b/core/ldlinux.asm
index ea42d88b..c7f6577c 100644
--- a/core/ldlinux.asm
+++ b/core/ldlinux.asm
@@ -901,6 +901,8 @@ getfattype:
mov di,ConfigName
call strcpy
+ mov eax,[RootDir] ; Make the root directory ...
+ mov [CurrentDir],eax ; ... the current directory
mov di,syslinux_cfg1
call open
jnz .config_open