aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Aleaxander <Aleaxander@gmail.com>2009-06-09 09:25:42 +0800
committerLiu Aleaxander <Aleaxander@gmail.com>2009-06-09 09:25:42 +0800
commitb3325d1ef92e9cfd172581d734122be9e00ff638 (patch)
treed1c657325e9e0112066785f48a105106d992b33c
parented632dd30b6d49e80ddf4320b7646782567e9c8f (diff)
downloadsyslinux-b3325d1ef92e9cfd172581d734122be9e00ff638.tar.gz
syslinux-b3325d1ef92e9cfd172581d734122be9e00ff638.tar.xz
syslinux-b3325d1ef92e9cfd172581d734122be9e00ff638.zip
Core:EXTLINUX: fix bug with lots of dots and searchdir
The bug hpa said in the email that prints lots of dots when loading a kernel fixed. And with my test, I found that the searchdir couldn't return correctly while not find what we wanna find.(In asm, the asm code use ZF flag to test if we successed. And I thought regs->esi.w[0] = file(be zero on fail) will set ZF flag). Well, It's a good thing that I found the reg structure has the eflags filed. then it works; nice thing!
-rw-r--r--core/ext2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/ext2.c b/core/ext2.c
index 657acc0e..cc60bf9b 100644
--- a/core/ext2.c
+++ b/core/ext2.c
@@ -528,8 +528,10 @@ void getfssec(com32sys_t *regs)
file->file_sector += con_sec_cnt; /* next sector index */
}while(sectors);
- if (bytes_read >= file->file_bytesleft)
+ if (bytes_read >= file->file_bytesleft) {
bytes_read = file->file_bytesleft;
+ regs->esi.w[0] = NULL; /* do close the file for asm function*/
+ }
file->file_bytesleft -= bytes_read;
regs->ecx.l = bytes_read;
@@ -744,6 +746,7 @@ void searchdir(com32sys_t * regs)
err_noclose:
file_len = 0;
file = NULL;
+ regs->eflags.l |= EFLAGS_ZF;
done:
regs->eax.l = file_len;