mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 06:43:13 +00:00
Detect devices using the NULL driver, and set the STARTED flag
svn path=/trunk/; revision=19520
This commit is contained in:
parent
c4cc828696
commit
bc8462e40a
1 changed files with 20 additions and 1 deletions
|
@ -1922,9 +1922,11 @@ IopActionConfigureChildServices(
|
||||||
PDEVICE_NODE DeviceNode,
|
PDEVICE_NODE DeviceNode,
|
||||||
PVOID Context)
|
PVOID Context)
|
||||||
{
|
{
|
||||||
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
|
RTL_QUERY_REGISTRY_TABLE QueryTable[3];
|
||||||
PDEVICE_NODE ParentDeviceNode;
|
PDEVICE_NODE ParentDeviceNode;
|
||||||
PUNICODE_STRING Service;
|
PUNICODE_STRING Service;
|
||||||
|
UNICODE_STRING ClassGUID;
|
||||||
|
UNICODE_STRING NullString = RTL_CONSTANT_STRING(L"");
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT("IopActionConfigureChildServices(%p, %p)\n", DeviceNode, Context);
|
DPRINT("IopActionConfigureChildServices(%p, %p)\n", DeviceNode, Context);
|
||||||
|
@ -1969,11 +1971,19 @@ IopActionConfigureChildServices(
|
||||||
|
|
||||||
RtlZeroMemory(QueryTable, sizeof(QueryTable));
|
RtlZeroMemory(QueryTable, sizeof(QueryTable));
|
||||||
RtlInitUnicodeString(Service, NULL);
|
RtlInitUnicodeString(Service, NULL);
|
||||||
|
RtlInitUnicodeString(&ClassGUID, NULL);
|
||||||
|
|
||||||
QueryTable[0].Name = L"Service";
|
QueryTable[0].Name = L"Service";
|
||||||
QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
|
QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
|
||||||
QueryTable[0].EntryContext = Service;
|
QueryTable[0].EntryContext = Service;
|
||||||
|
|
||||||
|
QueryTable[1].Name = L"ClassGUID";
|
||||||
|
QueryTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT;
|
||||||
|
QueryTable[1].EntryContext = &ClassGUID;
|
||||||
|
QueryTable[1].DefaultType = REG_SZ;
|
||||||
|
QueryTable[1].DefaultData = &NullString;
|
||||||
|
QueryTable[1].DefaultLength = 0;
|
||||||
|
|
||||||
RtlAppendUnicodeToString(&RegKey, L"\\Registry\\Machine\\System\\CurrentControlSet\\Enum\\");
|
RtlAppendUnicodeToString(&RegKey, L"\\Registry\\Machine\\System\\CurrentControlSet\\Enum\\");
|
||||||
RtlAppendUnicodeStringToString(&RegKey, &DeviceNode->InstancePath);
|
RtlAppendUnicodeStringToString(&RegKey, &DeviceNode->InstancePath);
|
||||||
|
|
||||||
|
@ -1993,6 +2003,15 @@ IopActionConfigureChildServices(
|
||||||
if (Service->Buffer == NULL)
|
if (Service->Buffer == NULL)
|
||||||
{
|
{
|
||||||
IopDeviceNodeSetFlag(DeviceNode, DNF_DISABLED);
|
IopDeviceNodeSetFlag(DeviceNode, DNF_DISABLED);
|
||||||
|
|
||||||
|
if (ClassGUID.Length != 0)
|
||||||
|
{
|
||||||
|
/* Device has a ClassGUID value, but no Service value.
|
||||||
|
* Suppose it is using the NULL driver, so state the
|
||||||
|
* device is started */
|
||||||
|
DPRINT("%wZ is using NULL driver\n", &DeviceNode->InstancePath);
|
||||||
|
IopDeviceNodeSetFlag(DeviceNode, DNF_STARTED);
|
||||||
|
}
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue