From 823141cd241c419fc7e88e2b10bf0fe800de4bad Mon Sep 17 00:00:00 2001 From: Gene Cumm Date: Fri, 1 Apr 2011 19:49:54 -0400 Subject: [PATCH] memdisk/dskprobe.c: Add status check to probes 08h and 41h If this fails, the machine should never be working. Signed-off-by: Gene Cumm --- memdisk/dskprobe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/memdisk/dskprobe.c b/memdisk/dskprobe.c index a3c2681..460bf64 100644 --- a/memdisk/dskprobe.c +++ b/memdisk/dskprobe.c @@ -95,6 +95,7 @@ static int probe_int13h_08h(uint8_t drive, com32sys_t * regs) regs->ebx.b[0], regs->edx.b[0]); present = !(regs->eflags.l & 1) && !regs->eax.b[1]; status = probe_int13h_01h(drive); + present = present && !(probe_int13h_01h_fail(status)); dskprobe_printf(" P%d\n", present); return present; } @@ -135,6 +136,7 @@ static int probe_int13h_41h(uint8_t drive, com32sys_t * regs) regs->ecx.w[0], regs->edx.b[1]); present = !(regs->eflags.l & 1) && (regs->ebx.w[0] == 0xAA55); status = probe_int13h_01h(drive); + present = present && !(probe_int13h_01h_fail(status)); dskprobe_printf(" P%d\n", present); return present; } -- 2.7.4