Author: cgutman
Date: Sun Apr 4 23:43:51 2010
New Revision: 46724
URL:
http://svn.reactos.org/svn/reactos?rev=46724&view=rev
Log:
[NTOSKRNL]
- Revert r46720 and fix the issue properly
Modified:
trunk/reactos/ntoskrnl/io/iomgr/irp.c
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/irp.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] Sun Apr 4 23:43:51 2010
@@ -460,22 +460,6 @@
}
else
{
- /* Check if we have an associated user IOSB */
- if (Irp->UserIosb)
- {
- /* We do, so let's give them the final status */
- _SEH2_TRY
- {
- /* Save the IOSB Information */
- *Irp->UserIosb = Irp->IoStatus;
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- /* Ignore any error */
- }
- _SEH2_END;
- }
-
/*
* Either we didn't return from the request, or we did return but this
* request was synchronous.
@@ -485,6 +469,9 @@
/* So we did return with a synch operation, was it the IRP? */
if (Irp->Flags & IRP_SYNCHRONOUS_API)
{
+ /* Yes, this IRP was synchronous, so return the I/O Status */
+ *Irp->UserIosb = Irp->IoStatus;
+
/* Now check if the user gave an event */
if (Irp->UserEvent)
{
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Sun Apr 4 23:43:51 2010
@@ -163,7 +163,10 @@
DPRINT("IopInitiatePnpIrp(IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
failed\n");
return Status;
}
- DeviceNode->ResourceRequirements =
(PIO_RESOURCE_REQUIREMENTS_LIST)IoStatusBlock.Information;
+ else if (NT_SUCCESS(Status))
+ {
+ DeviceNode->ResourceRequirements =
(PIO_RESOURCE_REQUIREMENTS_LIST)IoStatusBlock.Information;
+ }
Status = IopAssignDeviceResources(DeviceNode, &RequiredLength);
if (NT_SUCCESS(Status))