From e67a28c273880755946de097a24bf6d739bd3c5a Mon Sep 17 00:00:00 2001 From: Liu Aleaxander Date: Fri, 12 Jun 2009 15:45:52 +0800 Subject: [PATCH] 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. --- core/fs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.7.4