From: Hervé Poussineau Date: Thu, 15 Dec 2005 09:07:32 +0000 (+0000) Subject: Set DNF_ASSIGNING_RESOURCES, DNF_RESOURCE_ASSIGNED, DNF_RESOURCE_REPORTED and DNF_NO_... X-Git-Tag: backups/expat-rbuild@40467~921 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=7d2a60b58e6c08d0738bf82bbed1acf89c67dec9 Set DNF_ASSIGNING_RESOURCES, DNF_RESOURCE_ASSIGNED, DNF_RESOURCE_REPORTED and DNF_NO_RESOURCE_REQUIRED flags svn path=/trunk/; revision=20187 --- diff --git a/reactos/ntoskrnl/io/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr.c index f2a94bdf875..25d802d39dc 100644 --- a/reactos/ntoskrnl/io/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr.c @@ -1112,6 +1112,8 @@ IopAssignDeviceResources(PDEVICE_NODE DeviceNode) 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 @@ IopAssignDeviceResources(PDEVICE_NODE DeviceNode) 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 @@ ByeBye: DeviceNode->ResourceListTranslated = NULL; } + IopDeviceNodeClearFlag(DeviceNode, DNF_ASSIGNING_RESOURCES); return Status; } @@ -1867,14 +1872,18 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, &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; }