aboutsummaryrefslogtreecommitdiffstats
path: root/core/fs
diff options
context:
space:
mode:
Diffstat (limited to 'core/fs')
-rw-r--r--core/fs/fat/fat.c2
-rw-r--r--core/fs/lib/loadconfig.c16
2 files changed, 12 insertions, 6 deletions
diff --git a/core/fs/fat/fat.c b/core/fs/fat/fat.c
index a21f4312..9877a4d5 100644
--- a/core/fs/fat/fat.c
+++ b/core/fs/fat/fat.c
@@ -708,7 +708,7 @@ static int vfat_load_config(void)
com32sys_t regs;
int i;
- /* If installed by extlinux, try the extlinux filename */
+ /* If path filled by installer, then use that to load config*/
if (*CurrentDirName && !generic_load_config())
return 0;
diff --git a/core/fs/lib/loadconfig.c b/core/fs/lib/loadconfig.c
index 9318c1c3..d84bdef9 100644
--- a/core/fs/lib/loadconfig.c
+++ b/core/fs/lib/loadconfig.c
@@ -5,20 +5,26 @@
#include <fs.h>
/*
- * Standard version of load_config for extlinux-installed filesystems
+ * Standard version of load_config for extlinux/syslinux filesystems
*/
int generic_load_config(void)
{
com32sys_t regs;
chdir(CurrentDirName);
+ /* try extlinux.conf first */
realpath(ConfigName, "extlinux.conf", FILENAME_MAX);
-
- dprintf("Config = %s\n", ConfigName);
-
+ dprintf("Try config = %s\n", ConfigName);
memset(&regs, 0, sizeof regs);
regs.edi.w[0] = OFFS_WRT(ConfigName, 0);
call16(core_open, &regs, &regs);
-
+ /* give syslinux.cfg a chance ? */
+ if (regs.eflags.l & EFLAGS_ZF) {
+ realpath(ConfigName, "syslinux.cfg", FILENAME_MAX);
+ dprintf("Then try config = %s\n", ConfigName);
+ memset(&regs, 0, sizeof regs);
+ regs.edi.w[0] = OFFS_WRT(ConfigName, 0);
+ call16(core_open, &regs, &regs);
+ }
return (regs.eflags.l & EFLAGS_ZF) ? -1 : 0;
}