* Hopefully innocent hack to deal with NDN in ioctl.c (ignore upper bits

of the drive number)
    * use subst bit 15 for int21/ax=4409.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@463 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2002-11-09 19:34:04 +00:00
parent c7eef88bac
commit bca3ec2175
2 changed files with 17 additions and 4 deletions

View File

@ -131,6 +131,7 @@ struct dhdr {
BYTE dh_name[8];
};
#define ATTR_SUBST 0x8000
#define ATTR_CHAR 0x8000
#define ATTR_IOCTL 0x4000
#define ATTR_BLDFAT 0x2000

View File

@ -199,7 +199,14 @@ COUNT DosDevIOctl(lregs * r)
/* JPP - changed to use default drive if drive=0 */
/* JT Fixed it */
#define NDN_HACK
/* NDN feeds the actual ASCII drive letter to this function */
#ifdef NDN_HACK
CharReqHdr.r_unit = ((r->BL & 0x1f) == 0 ? default_drive :
(r->BL & 0x1f) - 1);
#else
CharReqHdr.r_unit = (r->BL == 0 ? default_drive : r->BL - 1);
#endif
dpbp = get_dpb(CharReqHdr.r_unit);
@ -223,10 +230,12 @@ COUNT DosDevIOctl(lregs * r)
}
return DE_INVLDFUNC;
case 0x09:
if (get_cds(CharReqHdr.r_unit) != NULL && dpbp == NULL)
{
struct cds FAR *cdsp = get_cds(CharReqHdr.r_unit);
r->AX = S_DONE | S_BUSY;
if (cdsp != NULL && dpbp == NULL)
{
r->DX = ATTR_REMOTE;
r->AX = S_DONE | S_BUSY;
}
else
{
@ -234,11 +243,14 @@ COUNT DosDevIOctl(lregs * r)
{
return DE_INVLDDRV;
}
/* Need to add subst bit 15 */
r->DX = dpbp->dpb_device->dh_attr;
r->AX = S_DONE | S_BUSY;
}
if (cdsp->cdsFlags & CDSSUBST)
{
r->DX |= ATTR_SUBST;
}
break;
}
case 0x0d:
nMode = C_GENIOCTL;
goto IoBlockCommon;