[NTOSKRNL] Add and call the CmpSaveBootControlSet() stub.
[reactos.git] / ntoskrnl / config / ntapi.c
index 5be3a27..824992f 100644 (file)
@@ -1302,7 +1302,8 @@ NtInitializeRegistry(IN USHORT Flag)
     PAGED_CODE();
 
     /* Always do this as kernel mode */
-    if (KeGetPreviousMode() == UserMode) return ZwInitializeRegistry(Flag);
+    if (KeGetPreviousMode() == UserMode)
+        return ZwInitializeRegistry(Flag);
 
     /* Enough of the system has booted by now */
     Ki386PerfEnd();
@@ -1321,8 +1322,8 @@ NtInitializeRegistry(IN USHORT Flag)
         Flag -= CM_BOOT_FLAG_ACCEPTED;
         if (Flag)
         {
-            /* FIXME: Save the last known good boot */
-            //Status = CmpSaveBootControlSet(Flag);
+            /* Save the last known good boot */
+            Status = CmpSaveBootControlSet(Flag);
 
             /* Notify HAL */
             HalEndOfBoot();
@@ -1344,8 +1345,8 @@ NtInitializeRegistry(IN USHORT Flag)
     if (!CmFirstTime) return STATUS_ACCESS_DENIED;
     CmFirstTime = FALSE;
 
-    /* Acquire registry lock */
-    //CmpLockRegistryExclusive();
+    /* Lock the registry exclusively */
+    CmpLockRegistryExclusive();
 
     /* Initialize the hives and lazy flusher */
     CmpCmdInit(SetupBoot);
@@ -1354,7 +1355,7 @@ NtInitializeRegistry(IN USHORT Flag)
     CmpSetVersionData();
 
     /* Release the registry lock */
-    //CmpUnlockRegistry();
+    CmpUnlockRegistry();
     return STATUS_SUCCESS;
 }