memdisk/dskprobe.c: Additional checks in INT13h AH08h and AH41h
authorShao Miller <shao.miller@yrdsb.edu.on.ca>
Thu, 27 Jan 2011 01:10:24 +0000 (20:10 -0500)
committerGene Cumm <gene.cumm@gmail.com>
Thu, 27 Jan 2011 01:40:41 +0000 (20:40 -0500)
commit61df6e617c2d755ef8cac91c8c4b9bc2710b2bee
treef9e9d15c56d597fe44981a3910830959a335b427
parent558087bfd62e8f74f58157e885cecc00feba836a
memdisk/dskprobe.c: Additional checks in INT13h AH08h and AH41h

Some BIOSs lie and don't set CF when they should.

Additional comments from Shao:

Fix INT 0x13, AH==0x08 disk drive probe.

This function might return CF==0 ("success"), but could return a
standard response no matter which drive number is passed in DL, but
based only on DL's bit 7.  Fortunately, AH should be 0 for an existent
drive and 01h for a non-existent drive.  Now we check AH.

Fix INT 0x13, AH==0x41 disk drive probe

This function might return CF==0 ("success"), but could also include BX
left unchanged.  If extensions are present, BX should be returned with
0xAA55.  So we now check for this special value in our determination of
a drive's presence.

Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
memdisk/dskprobe.c