Set DNF_ASSIGNING_RESOURCES, DNF_RESOURCE_ASSIGNED,
DNF_RESOURCE_REPORTED and DNF_NO_RESOURCE_REQUIRED flags
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
_____
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
--- trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-12-15 01:47:36 UTC (rev
20186)
+++ trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-12-15 09:07:32 UTC (rev
20187)
@@ -1112,6 +1112,8 @@
return STATUS_SUCCESS;
}
+ IopDeviceNodeSetFlag(DeviceNode, DNF_ASSIGNING_RESOURCES);
+
/* FIXME: that's here that PnP arbiter should go */
/* Actually, simply use resource list #0 as assigned resource list
*/
ResourceList = &DeviceNode->ResourceRequirements->List[0];
@@ -1315,6 +1317,8 @@
DeviceNode->ResourceList->List[0].PartialResourceList.Count =
NumberOfResources;
DeviceNode->ResourceListTranslated->List[0].PartialResourceList.Count =
NumberOfResources;
+ IopDeviceNodeClearFlag(DeviceNode, DNF_ASSIGNING_RESOURCES);
+ IopDeviceNodeSetFlag(DeviceNode, DNF_RESOURCE_ASSIGNED);
return STATUS_SUCCESS;
ByeBye:
@@ -1329,6 +1333,7 @@
DeviceNode->ResourceListTranslated = NULL;
}
+ IopDeviceNodeClearFlag(DeviceNode, DNF_ASSIGNING_RESOURCES);
return Status;
}
@@ -1867,14 +1872,18 @@
&IoStatusBlock,
IRP_MN_QUERY_RESOURCE_REQUIREMENTS,
NULL);
- if (NT_SUCCESS(Status) && IoStatusBlock.Information)
+ if (NT_SUCCESS(Status))
{
DeviceNode->ResourceRequirements =
(PIO_RESOURCE_REQUIREMENTS_LIST)IoStatusBlock.Information;
+ if (IoStatusBlock.Information)
+ IopDeviceNodeSetFlag(DeviceNode, DNF_RESOURCE_REPORTED);
+ else
+ IopDeviceNodeSetFlag(DeviceNode, DNF_NO_RESOURCE_REQUIRED);
}
else
{
- DPRINT("IopInitiatePnpIrp() failed (Status %x) or
IoStatusBlock.Information=NULL\n", Status);
+ DPRINT("IopInitiatePnpIrp() failed (Status %08lx)\n", Status);
DeviceNode->ResourceRequirements = NULL;
}
Show replies by date