mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 15:03:48 +00:00
Forward all IRPs, even unknown ones
svn path=/trunk/; revision=33577
This commit is contained in:
parent
5dd0513c53
commit
36ce0cd8af
1 changed files with 4 additions and 43 deletions
|
@ -37,56 +37,17 @@ IrpStub(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PIRP Irp)
|
IN PIRP Irp)
|
||||||
{
|
{
|
||||||
NTSTATUS Status = STATUS_NOT_SUPPORTED;
|
|
||||||
|
|
||||||
if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO)
|
if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO)
|
||||||
{
|
{
|
||||||
/* Forward some IRPs to lower device */
|
/* Forward IRPs to lower device */
|
||||||
switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction)
|
|
||||||
{
|
|
||||||
case IRP_MJ_CREATE:
|
|
||||||
case IRP_MJ_CLOSE:
|
|
||||||
case IRP_MJ_CLEANUP:
|
|
||||||
case IRP_MJ_QUERY_INFORMATION:
|
|
||||||
case IRP_MJ_READ:
|
|
||||||
case IRP_MJ_WRITE:
|
|
||||||
case IRP_MJ_DEVICE_CONTROL:
|
|
||||||
return ForwardIrpToLowerDeviceAndForget(DeviceObject, Irp);
|
return ForwardIrpToLowerDeviceAndForget(DeviceObject, Irp);
|
||||||
default:
|
|
||||||
{
|
|
||||||
WARN_(SERENUM, "FDO stub for major function 0x%lx\n",
|
|
||||||
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
|
|
||||||
ASSERT(FALSE);
|
|
||||||
return ForwardIrpToLowerDeviceAndForget(DeviceObject, Irp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Forward some IRPs to attached FDO */
|
/* Forward IRPs to attached FDO */
|
||||||
switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction)
|
|
||||||
{
|
|
||||||
case IRP_MJ_CREATE:
|
|
||||||
case IRP_MJ_CLOSE:
|
|
||||||
case IRP_MJ_CLEANUP:
|
|
||||||
case IRP_MJ_READ:
|
|
||||||
case IRP_MJ_WRITE:
|
|
||||||
case IRP_MJ_DEVICE_CONTROL:
|
|
||||||
return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp);
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
WARN_(SERENUM, "PDO stub for major function 0x%lx\n",
|
|
||||||
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
|
|
||||||
ASSERT(FALSE);
|
|
||||||
return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp);
|
return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Irp->IoStatus.Status = Status;
|
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Standard DriverEntry method.
|
* Standard DriverEntry method.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue