From f76c5d0d0ef296e6b5b942194137d6da593fa653 Mon Sep 17 00:00:00 2001 From: Shao Miller Date: Tue, 25 Jan 2011 17:16:47 -0500 Subject: [PATCH] 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 --- memdisk/dskprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memdisk/dskprobe.c b/memdisk/dskprobe.c index 8c2f27b..84400a8 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; -- 2.7.4