mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
- Map return codes from the miniport's device i/o control routine from
win32 error code to ntstatus values. svn path=/trunk/; revision=8727
This commit is contained in:
parent
7c4c3bfb0b
commit
e52b5b410e
1 changed files with 21 additions and 3 deletions
|
@ -18,7 +18,7 @@
|
||||||
* If not, write to the Free Software Foundation,
|
* If not, write to the Free Software Foundation,
|
||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* $Id: videoprt.c,v 1.21 2004/03/13 00:41:40 dwelch Exp $
|
* $Id: videoprt.c,v 1.22 2004/03/14 18:35:02 dwelch Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "videoprt.h"
|
#include "videoprt.h"
|
||||||
|
@ -620,7 +620,6 @@ VideoPortInitialize(IN PVOID Context1,
|
||||||
|
|
||||||
/* Call HwFindAdapter entry point */
|
/* Call HwFindAdapter entry point */
|
||||||
/* FIXME: Need to figure out what string to pass as param 3 */
|
/* FIXME: Need to figure out what string to pass as param 3 */
|
||||||
DPRINT("FindAdapter %X\n", HwInitializationData->HwFindAdapter);
|
|
||||||
Status = HwInitializationData->HwFindAdapter(&DeviceExtension->MiniPortDeviceExtension,
|
Status = HwInitializationData->HwFindAdapter(&DeviceExtension->MiniPortDeviceExtension,
|
||||||
Context2,
|
Context2,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -1238,7 +1237,26 @@ VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject,
|
||||||
/* Free the VRP */
|
/* Free the VRP */
|
||||||
ExFreePool(vrp);
|
ExFreePool(vrp);
|
||||||
|
|
||||||
DPRINT("- Returned status: %x\n", Irp->IoStatus.Status);
|
DPRINT("- Returned status: %x/%d\n", Irp->IoStatus.Status,
|
||||||
|
Irp->IoStatus.Information);
|
||||||
|
if (Irp->IoStatus.Status != STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
if (Irp->IoStatus.Status != ERROR_MORE_DATA)
|
||||||
|
{
|
||||||
|
Irp->IoStatus.Information = 0;
|
||||||
|
}
|
||||||
|
/* Map from win32 error codes to ntstatus values. */
|
||||||
|
switch (Irp->IoStatus.Status)
|
||||||
|
{
|
||||||
|
case ERROR_NOT_ENOUGH_MEMORY: return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
case ERROR_MORE_DATA: return STATUS_BUFFER_OVERFLOW;
|
||||||
|
case ERROR_INVALID_FUNCTION: return STATUS_NOT_IMPLEMENTED;
|
||||||
|
case ERROR_INVALID_PARAMETER: return STATUS_INVALID_PARAMETER;
|
||||||
|
case ERROR_INSUFFICIENT_BUFFER: return STATUS_BUFFER_TOO_SMALL;
|
||||||
|
case ERROR_DEV_NOT_EXIST: return STATUS_DEVICE_DOES_NOT_EXIST;
|
||||||
|
case ERROR_IO_PENDING: return STATUS_PENDING;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue