From 197d4d0964f1491a20c4ef45eafcc68c1fed7c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 16 Oct 2005 14:10:29 +0000 Subject: [PATCH] Sorry, most devices were reinstalled at each boot, as the calculated crc32 for the parent was changing. Prevent this by using only the parent InstancePath instead of the whole DEVICE_NODE structure svn path=/trunk/; revision=18497 --- reactos/ntoskrnl/io/pnpmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr.c index 5eaf416b24b..2408d4b6605 100644 --- a/reactos/ntoskrnl/io/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr.c @@ -1415,8 +1415,8 @@ IopGetParentIdPrefix( goto cleanup; /* 2. Create the ParentIdPrefix value */ - currentByte = (PBYTE)DeviceNode->Parent; - for (i = 0; i < sizeof(DEVICE_NODE); i++, currentByte++) + currentByte = (PBYTE)DeviceNode->Parent->InstancePath.Buffer; + for (i = 0; i < DeviceNode->Parent->InstancePath.Length; i++, currentByte++) crc32 = (crc32 >> 8) ^ crc32Table[*currentByte ^ (crc32 & 0xff)]; crc32 = ~crc32; KeyValue.Buffer = (PWSTR)ParentIdPrefixInformation->Data;