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
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
_____
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
--- trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-10-16 11:17:26 UTC (rev
18496)
+++ trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-10-16 14:10:29 UTC (rev
18497)
@@ -1415,8 +1415,8 @@
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;