diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-07-25 17:27:37 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-07-25 17:28:10 -0700 |
commit | 6f2d1b84131b0a9039562dbd96dbd27e0079f287 (patch) | |
tree | 45bb405516eb2abfc37abeee6b54a1ec5ee664fa /core/fs/fs.c | |
parent | 4ad669661e034f6069c3ce0d6b97a8f297cf33b3 (diff) | |
download | syslinux-6f2d1b84131b0a9039562dbd96dbd27e0079f287.tar.gz |
core: don't hang if no config file is found
If we can't find a configuration file, we need to do something
slightly more friendly than hanging.
Reported-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/fs/fs.c')
-rw-r--r-- | core/fs/fs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/fs/fs.c b/core/fs/fs.c index 48856c9e..d10f6a83 100644 --- a/core/fs/fs.c +++ b/core/fs/fs.c @@ -77,7 +77,7 @@ void _close_file(struct file *file) * Convert between a 16-bit file handle and a file structure */ -void load_config(void) +void pm_load_config(com32sys_t *regs) { int err; @@ -85,6 +85,9 @@ void load_config(void) if (err) printf("ERROR: No configuration file found\n"); + + regs->eflags.l &= ~(EFLAGS_ZF | EFLAGS_CF); + regs->eflags.l |= err ? EFLAGS_ZF : 0; } void pm_mangle_name(com32sys_t *regs) |