mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:35:43 +00:00
[NTVDM]
Implement those IOCTLs (0x06 and 0x07) for files too, not just devices. svn path=/trunk/; revision=67749
This commit is contained in:
parent
2e894b43c1
commit
6020ed7ad1
1 changed files with 40 additions and 20 deletions
|
@ -939,11 +939,10 @@ BOOLEAN DosDeviceIoControl(WORD FileHandle, BYTE ControlCode, DWORD Buffer, PWOR
|
||||||
/* Get Input Status */
|
/* Get Input Status */
|
||||||
case 0x06:
|
case 0x06:
|
||||||
{
|
{
|
||||||
if (Node == NULL)
|
/* Check if this is a file or a device */
|
||||||
|
if (Node)
|
||||||
{
|
{
|
||||||
Sda->LastErrorCode = ERROR_INVALID_FUNCTION;
|
/* Device*/
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Node->InputStatusRoutine && Node->InputStatusRoutine(Node))
|
if (Node->InputStatusRoutine && Node->InputStatusRoutine(Node))
|
||||||
{
|
{
|
||||||
|
@ -955,6 +954,22 @@ BOOLEAN DosDeviceIoControl(WORD FileHandle, BYTE ControlCode, DWORD Buffer, PWOR
|
||||||
/* Not ready */
|
/* Not ready */
|
||||||
*Length = 0;
|
*Length = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* File */
|
||||||
|
|
||||||
|
if (Descriptor->Position < Descriptor->Size)
|
||||||
|
{
|
||||||
|
/* Set the length to 0xFF to mark that it's ready */
|
||||||
|
*Length = 0xFF;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Not ready */
|
||||||
|
*Length = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -962,11 +977,10 @@ BOOLEAN DosDeviceIoControl(WORD FileHandle, BYTE ControlCode, DWORD Buffer, PWOR
|
||||||
/* Get Output Status */
|
/* Get Output Status */
|
||||||
case 0x07:
|
case 0x07:
|
||||||
{
|
{
|
||||||
if (Node == NULL)
|
/* Check if this is a file or a device */
|
||||||
|
if (Node)
|
||||||
{
|
{
|
||||||
Sda->LastErrorCode = ERROR_INVALID_FUNCTION;
|
/* Device*/
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Node->OutputStatusRoutine && Node->OutputStatusRoutine(Node))
|
if (Node->OutputStatusRoutine && Node->OutputStatusRoutine(Node))
|
||||||
{
|
{
|
||||||
|
@ -978,6 +992,12 @@ BOOLEAN DosDeviceIoControl(WORD FileHandle, BYTE ControlCode, DWORD Buffer, PWOR
|
||||||
/* Not ready */
|
/* Not ready */
|
||||||
*Length = 0;
|
*Length = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Files are always ready for output */
|
||||||
|
*Length = 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue