summaryrefslogtreecommitdiff
path: root/memdisk
diff options
context:
space:
mode:
authorShao Miller <shao.miller@yrdsb.edu.on.ca>2011-01-25 17:16:47 -0500
committerShao Miller <shao.miller@yrdsb.edu.on.ca>2011-01-25 17:16:47 -0500
commitf76c5d0d0ef296e6b5b942194137d6da593fa653 (patch)
treed3065b06bce1d9b909996b3343b3a529d1bbb12c /memdisk
parent0e64cf5dc6584e9bfefaeb83cd266de13319baa5 (diff)
downloadsyslinux-f76c5d0d0ef296e6b5b942194137d6da593fa653.tar.gz
memdisk: Fix INT 0x13, AH==0x15 disk drive probe
The function might return CF==0 ("success"), but could include AH==0 ("no such drive"). This is the case on at least a number of Dell models. Now we check AH, too. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/dskprobe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memdisk/dskprobe.c b/memdisk/dskprobe.c
index 8c2f27b8..84400a83 100644
--- a/memdisk/dskprobe.c
+++ b/memdisk/dskprobe.c
@@ -72,7 +72,7 @@ static int probe_int13h_15h(uint8_t drive, com32sys_t * regs)
memset(regs, 0, sizeof *regs);
probe_any(0x15, drive, regs);
- present = !(regs->eflags.l & 1);
+ present = !(regs->eflags.l & 1) && regs->eax.b[1];
dskprobe_printf(" AH15: CF%d AH%02x\n", regs->eflags.l & 1,
regs->eax.b[1]);
return present;