From: Liu Aleaxander Date: Fri, 12 Jun 2009 07:45:52 +0000 (+0800) Subject: Core: fix the not found error when type the kernel name without the extent. X-Git-Tag: syslinux-4.00-pre1~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e67a28c273880755946de097a24bf6d739bd3c5a;p=platform%2Fupstream%2Fsyslinux.git Core: fix the not found error when type the kernel name without the extent. it will not clear the zf flag when not found the right file, so it will give the next file search(searching for a different filename extentsion the wrong answer, so we need do it after every file searching. well, in fact we should use EAX(the file lenght in bytes) or si(the open_file_t structure pointer) to indicate if we have successfully found the file or not. --- diff --git a/core/fs.c b/core/fs.c index cbb2080..617e3e5 100644 --- a/core/fs.c +++ b/core/fs.c @@ -68,7 +68,9 @@ void searchdir(com32sys_t *regs) this_fs->fs_ops->searchdir(filename, &file); regs->esi.w[0] = OFFS_WRT(file.open_file, 0); regs->eax.l = file.file_len; - if (!file.file_len) + if (file.file_len) + regs->eflags.l &= ~EFLAGS_ZF; + else regs->eflags.l |= EFLAGS_ZF; }