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.
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;
}