Setting of device node flags DNF_PROCESSED and DNF_ENUMERATED.

svn path=/trunk/; revision=6181
This commit is contained in:
Filip Navara 2003-09-28 12:52:53 +00:00
parent 6e65f7ed9f
commit 59760bf0d0

View file

@ -1,4 +1,4 @@
/* $Id: pnpmgr.c,v 1.15 2003/09/25 15:54:42 navaraf Exp $ /* $Id: pnpmgr.c,v 1.16 2003/09/28 12:52:53 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -593,7 +593,7 @@ IopActionInterrogateDeviceStack(
WCHAR InstancePath[MAX_PATH]; WCHAR InstancePath[MAX_PATH];
IO_STACK_LOCATION Stack; IO_STACK_LOCATION Stack;
NTSTATUS Status; NTSTATUS Status;
WCHAR KeyBuffer[MAX_PATH]; PWSTR KeyBuffer;
DPRINT("DeviceNode %x Context %x\n", DeviceNode, Context); DPRINT("DeviceNode %x Context %x\n", DeviceNode, Context);
@ -807,17 +807,14 @@ IopActionInterrogateDeviceStack(
DPRINT("InstancePath is %S\n", DeviceNode->InstancePath.Buffer); DPRINT("InstancePath is %S\n", DeviceNode->InstancePath.Buffer);
/* /*
* Create registry key for the device id, if it doesn't exist yet * Create registry key for the instance id, if it doesn't exist yet
*
* FIXME: This code is temporary until I figure out where these keys should
* be created. The keys are needed for installation of PnP drivers.
*
* FiN
*/ */
KeyBuffer = ExAllocatePool(PagedPool, (49 + DeviceNode->InstancePath.Length) * sizeof(WCHAR));
wcscpy(KeyBuffer, L"\\Registry\\Machine\\System\\CurrentControlSet\\Enum\\"); wcscpy(KeyBuffer, L"\\Registry\\Machine\\System\\CurrentControlSet\\Enum\\");
wcscat(KeyBuffer, DeviceNode->DeviceID.Buffer); wcscat(KeyBuffer, DeviceNode->InstancePath.Buffer);
RtlpCreateRegistryKeyPath(KeyBuffer); RtlpCreateRegistryKeyPath(KeyBuffer);
ExFreePool(KeyBuffer);
DeviceNode->Flags |= DNF_PROCESSED;
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
@ -1116,6 +1113,7 @@ IopInterrogateBusExtender(
DeviceNode, DeviceNode,
DeviceRelations->Objects[i], DeviceRelations->Objects[i],
&ChildDeviceNode); &ChildDeviceNode);
DeviceNode->Flags |= DNF_ENUMERATED;
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT("No resources\n"); DPRINT("No resources\n");