[ros-diffs] [ekohl] 26980: Redirect registry keys from 'CurrentControlSet' to 'ControlSet001' without using registry links.

ekohl at svn.reactos.org ekohl at svn.reactos.org
Fri Jun 8 17:35:01 CEST 2007


Author: ekohl
Date: Sun Jun  3 23:01:58 2007
New Revision: 26980

URL: http://svn.reactos.org/svn/reactos?rev=26980&view=rev
Log:
Redirect registry keys from 'CurrentControlSet' to 'ControlSet001' without using registry links.

Modified:
    trunk/reactos/tools/mkhive/registry.c

Modified: trunk/reactos/tools/mkhive/registry.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/registry.c?rev=26980&r1=26979&r2=26980&view=diff
==============================================================================
--- trunk/reactos/tools/mkhive/registry.c (original)
+++ trunk/reactos/tools/mkhive/registry.c Sun Jun  3 23:01:58 2007
@@ -132,8 +132,9 @@
 		else
 			RtlInitUnicodeString(&KeyString, LocalKeyName);
 
-		while (ParentKey->DataType == REG_LINK)
-			ParentKey = ParentKey->LinkedKey;
+		/* Redirect from 'CurrentControlSet' to 'ControlSet001' */
+		if (!wcsncmp(LocalKeyName, L"CurrentControlSet", 17))
+			RtlInitUnicodeString(&KeyString, L"ControlSet001");
 
 		/* Check subkey in memory structure */
 		Ptr = ParentKey->SubKeyList.Flink;
@@ -667,16 +668,11 @@
 		&SystemHive,
 		L"Registry\\Machine\\SYSTEM");
 
-	/* Create link 'CurrentControlSet' --> 'ControlSet001' */
+	/* Create 'ControlSet001' key */
 	RegCreateKeyW(
 		NULL,
 		L"Registry\\Machine\\SYSTEM\\ControlSet001",
 		&ControlSetKey);
-	RegCreateKeyW(
-		NULL,
-		L"Registry\\Machine\\SYSTEM\\CurrentControlSet",
-		&LinkKey);
-	RegSetValueExW(LinkKey, NULL, 0, REG_LINK, (PCHAR)&ControlSetKey, sizeof(PVOID));
 }
 
 /* EOF */




More information about the Ros-diffs mailing list