mirror of
https://github.com/reactos/reactos.git
synced 2025-06-22 13:40:19 +00:00
[NTOS:PNP] PiSetDevNodeText: Do not overwrite existing DeviceDesc values
CORE-17513
This commit is contained in:
parent
badcfb2f7d
commit
d8c38c4b4c
1 changed files with 2 additions and 2 deletions
|
@ -1101,13 +1101,13 @@ PiSetDevNodeText(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 1: write DeviceDesc key if not exists
|
// Step 1: Write the DeviceDesc value if does not exist
|
||||||
|
|
||||||
UNICODE_STRING valDeviceDesc = RTL_CONSTANT_STRING(L"DeviceDesc");
|
UNICODE_STRING valDeviceDesc = RTL_CONSTANT_STRING(L"DeviceDesc");
|
||||||
ULONG len;
|
ULONG len;
|
||||||
|
|
||||||
status = ZwQueryValueKey(InstanceKey, &valDeviceDesc, KeyValueBasicInformation, NULL, 0, &len);
|
status = ZwQueryValueKey(InstanceKey, &valDeviceDesc, KeyValueBasicInformation, NULL, 0, &len);
|
||||||
if (!NT_SUCCESS(status))
|
if (status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||||
{
|
{
|
||||||
PWSTR deviceDesc = NULL;
|
PWSTR deviceDesc = NULL;
|
||||||
status = PiIrpQueryDeviceText(DeviceNode, localeId, DeviceTextDescription, &deviceDesc);
|
status = PiIrpQueryDeviceText(DeviceNode, localeId, DeviceTextDescription, &deviceDesc);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue