mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 06:16:38 +00:00
[NTOSKRNL] Create the 'Device Parameters' subkey and add the 'FirmwareIdentified' value for all ACPI-enumerated devices.
This commit is contained in:
parent
2550325577
commit
e1b82b5b91
1 changed files with 40 additions and 5 deletions
|
@ -1536,11 +1536,10 @@ IopSetDeviceInstanceData(HANDLE InstanceKey,
|
||||||
{
|
{
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
UNICODE_STRING KeyName;
|
UNICODE_STRING KeyName;
|
||||||
HANDLE LogConfKey;
|
HANDLE LogConfKey, ControlKey, DeviceParamsKey;
|
||||||
ULONG ResCount;
|
ULONG ResCount;
|
||||||
ULONG ResultLength;
|
ULONG ResultLength;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
HANDLE ControlHandle;
|
|
||||||
|
|
||||||
DPRINT("IopSetDeviceInstanceData() called\n");
|
DPRINT("IopSetDeviceInstanceData() called\n");
|
||||||
|
|
||||||
|
@ -1619,10 +1618,46 @@ IopSetDeviceInstanceData(HANDLE InstanceKey,
|
||||||
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
|
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
|
||||||
InstanceKey,
|
InstanceKey,
|
||||||
NULL);
|
NULL);
|
||||||
Status = ZwCreateKey(&ControlHandle, 0, &ObjectAttributes, 0, NULL, REG_OPTION_VOLATILE, NULL);
|
Status = ZwCreateKey(&ControlKey,
|
||||||
|
0,
|
||||||
|
&ObjectAttributes,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
REG_OPTION_VOLATILE,
|
||||||
|
NULL);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
ZwClose(ControlHandle);
|
ZwClose(ControlKey);
|
||||||
|
|
||||||
|
/* Create the 'Device Parameters' key and set the 'FirmwareIdentified' value for all ACPI-enumerated devices */
|
||||||
|
if (_wcsnicmp(DeviceNode->InstancePath.Buffer, L"ACPI\\", 5) == 0)
|
||||||
|
{
|
||||||
|
RtlInitUnicodeString(&KeyName, L"Device Parameters");
|
||||||
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
&KeyName,
|
||||||
|
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
|
||||||
|
InstanceKey,
|
||||||
|
NULL);
|
||||||
|
Status = ZwCreateKey(&DeviceParamsKey,
|
||||||
|
0,
|
||||||
|
&ObjectAttributes,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
REG_OPTION_NON_VOLATILE,
|
||||||
|
NULL);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
ULONG FirmwareIdentified = 1;
|
||||||
|
RtlInitUnicodeString(&KeyName, L"FirmwareIdentified");
|
||||||
|
Status = ZwSetValueKey(DeviceParamsKey,
|
||||||
|
&KeyName,
|
||||||
|
0,
|
||||||
|
REG_DWORD,
|
||||||
|
&FirmwareIdentified,
|
||||||
|
sizeof(FirmwareIdentified));
|
||||||
|
|
||||||
|
ZwClose(DeviceParamsKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DPRINT("IopSetDeviceInstanceData() done\n");
|
DPRINT("IopSetDeviceInstanceData() done\n");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue