[NTOS:CM]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 30 May 2014 20:40:02 +0000 (20:40 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 30 May 2014 20:40:02 +0000 (20:40 +0000)
- Add a DPRINT1 in CmCheckRegistry because it is unimplemented, and give the CheckFlags value to CmCheckRegistry, when it is called in CmpInitializeHive.
- Give the CheckFlags value to CmpInitializeHive, when it is called in CmpInitHiveFromFile.
- Really mention that the CmCreateRootNode call is a HACK for ROS.

svn path=/trunk/; revision=63505

reactos/ntoskrnl/config/cmcheck.c
reactos/ntoskrnl/config/cminit.c
reactos/ntoskrnl/config/cmsysini.c

index d166ff4..4172ddd 100644 (file)
@@ -22,5 +22,6 @@ CmCheckRegistry(IN PCMHIVE RegistryHive,
                 IN ULONG Flags)
 {
     /* FIXME: HACK! */
                 IN ULONG Flags)
 {
     /* FIXME: HACK! */
+    DPRINT1("CmCheckRegistry(0x%p, %lu) is UNIMPLEMENTED!\n", RegistryHive, Flags);
     return 0;
 }
     return 0;
 }
index 8689e8e..147ba73 100644 (file)
@@ -214,7 +214,8 @@ CmpInitializeHive(OUT PCMHIVE *RegistryHive,
         (OperationType == HINIT_MAPFILE))
     {
         /* Verify integrity */
         (OperationType == HINIT_MAPFILE))
     {
         /* Verify integrity */
-        if (CmCheckRegistry((PCMHIVE)Hive, TRUE))
+        ULONG CheckStatus = CmCheckRegistry(Hive, CheckFlags);
+        if (CheckStatus != 0)
         {
             /* Cleanup allocations and fail */
             ExFreePoolWithTag(Hive->FlusherLock, TAG_CM);
         {
             /* Cleanup allocations and fail */
             ExFreePoolWithTag(Hive->FlusherLock, TAG_CM);
index 45242d2..f0a7d7e 100644 (file)
@@ -358,7 +358,7 @@ CmpInitHiveFromFile(IN PCUNICODE_STRING HiveName,
                                LogHandle,
                                NULL,
                                HiveName,
                                LogHandle,
                                NULL,
                                HiveName,
-                               0);
+                               CheckFlags);
     if (!NT_SUCCESS(Status))
     {
         /* Fail */
     if (!NT_SUCCESS(Status))
     {
         /* Fail */
@@ -370,7 +370,7 @@ CmpInitHiveFromFile(IN PCUNICODE_STRING HiveName,
     /* Success, return hive */
     *Hive = NewHive;
 
     /* Success, return hive */
     *Hive = NewHive;
 
-    /* ROS: Init root key cell and prepare the hive */
+    /* HACK: ROS: Init root key cell and prepare the hive */
     if (Operation == HINIT_CREATE) CmCreateRootNode(&NewHive->Hive, L"");
 
     /* Duplicate the hive name */
     if (Operation == HINIT_CREATE) CmCreateRootNode(&NewHive->Hive, L"");
 
     /* Duplicate the hive name */