mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-29 16:54:12 +02:00
Compatibility: Allow fat/data/dir type hints even for disk read
in int 21.7305 to fix compat issue found by Christian Wallbaum. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1365 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
bec1b777f4
commit
74167734ff
@ -351,9 +351,10 @@ int int21_fat32(lregs *r)
|
||||
struct HugeSectorBlock FAR *SectorBlock =
|
||||
(struct HugeSectorBlock FAR *)MK_FP(r->DS, r->BX);
|
||||
UBYTE mode;
|
||||
/* bit 0 of SI is 0 read / 1 write, bits 13/14 indicate a type: */
|
||||
/* 0 any, 1 fat, 2 dir, 3 file. Type is mostly for "write hints" */
|
||||
|
||||
if (r->CX != 0xffff || ((r->SI & 1) == 0 && r->SI != 0)
|
||||
|| (r->SI & ~0x6001))
|
||||
if (r->CX != 0xffff || (r->SI & ~0x6001))
|
||||
{
|
||||
return DE_INVLDPARM;
|
||||
}
|
||||
@ -361,7 +362,7 @@ int int21_fat32(lregs *r)
|
||||
if (r->DL > lastdrive || r->DL == 0)
|
||||
return -0x207;
|
||||
|
||||
if (r->SI == 0)
|
||||
if ((r->SI & 1) == 0) /* while uncommon, reads CAN have type hints */
|
||||
mode = DSKREADINT25;
|
||||
else
|
||||
mode = DSKWRITEINT26;
|
||||
|
Loading…
x
Reference in New Issue
Block a user