Skip to content

Commit b2f23f5

Browse files
andrewbirdPerditionC
authored andcommitted
IOCTL: Add int21/4408 is drive removable
1 parent 34003d0 commit b2f23f5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

kernel/ioctl.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,24 @@ int DosDevIOctl(lregs * r)
184184
}
185185
else
186186
{
187-
if (r->AL != 9)
187+
if (r->AL != 8 && r->AL != 9)
188188
return DE_INVLDDRV;
189189
dev = NULL;
190190
attr = ATTR_REMOTE;
191191
}
192192

193193
switch (r->AL)
194194
{
195+
case 0x08:
196+
{
197+
struct cds FAR *cdsp = get_cds1(r->BL & 0x1f);
198+
if (cdsp == NULL)
199+
return DE_INVLDDRV;
200+
if (cdsp->cdsFlags & CDSNETWDRV)
201+
return DE_INVLDFUNC;
202+
r->AX = (dpbp->dpb_flags == M_DONT_KNOW);
203+
return SUCCESS;
204+
}
195205
case 0x09:
196206
{
197207
/* note from get_dpb() */
@@ -213,7 +223,7 @@ int DosDevIOctl(lregs * r)
213223
return SUCCESS;
214224
}
215225
/* fall through */
216-
default: /* 0x04, 0x05, 0x08, 0x0e, 0x0f, 0x11 */
226+
default: /* 0x04, 0x05, 0x0e, 0x0f, 0x11 */
217227
break;
218228
}
219229
break;

0 commit comments

Comments
 (0)