mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Initialize registry hives only once.
svn path=/trunk/; revision=3651
This commit is contained in:
parent
e8f680ecbb
commit
95bb94d117
1 changed files with 22 additions and 6 deletions
|
@ -6,6 +6,8 @@
|
||||||
* UPDATE HISTORY:
|
* UPDATE HISTORY:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <roscfg.h>
|
#include <roscfg.h>
|
||||||
#include <internal/ob.h>
|
#include <internal/ob.h>
|
||||||
|
@ -19,9 +21,16 @@
|
||||||
|
|
||||||
#include "cm.h"
|
#include "cm.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
extern POBJECT_TYPE CmiKeyType;
|
extern POBJECT_TYPE CmiKeyType;
|
||||||
extern PREGISTRY_HIVE CmiVolatileHive;
|
extern PREGISTRY_HIVE CmiVolatileHive;
|
||||||
|
|
||||||
|
static BOOLEAN CmiRegistryInitialized = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
NtCreateKey(OUT PHANDLE KeyHandle,
|
NtCreateKey(OUT PHANDLE KeyHandle,
|
||||||
|
@ -775,9 +784,9 @@ END FIXME*/
|
||||||
RegistryHive->HiveHeader->Checksum = 0;
|
RegistryHive->HiveHeader->Checksum = 0;
|
||||||
pEntDword = (DWORD *) RegistryHive->HiveHeader;
|
pEntDword = (DWORD *) RegistryHive->HiveHeader;
|
||||||
for (i = 0; i < 127 ; i++)
|
for (i = 0; i < 127 ; i++)
|
||||||
{
|
{
|
||||||
RegistryHive->HiveHeader->Checksum ^= pEntDword[i];
|
RegistryHive->HiveHeader->Checksum ^= pEntDword[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write new header */
|
/* Write new header */
|
||||||
fileOffset.u.LowPart = 0;
|
fileOffset.u.LowPart = 0;
|
||||||
|
@ -1575,11 +1584,18 @@ NtUnloadKey(IN HANDLE KeyHandle)
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
NtInitializeRegistry(IN BOOLEAN SetUpBoot)
|
NtInitializeRegistry(IN BOOLEAN SetUpBoot)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status = STATUS_ACCESS_DENIED;
|
||||||
|
|
||||||
/* FIXME: save boot log file */
|
if (CmiRegistryInitialized == FALSE)
|
||||||
|
{
|
||||||
|
/* FIXME: save boot log file */
|
||||||
|
|
||||||
Status = CmiInitHives(SetUpBoot);
|
Status = CmiInitHives(SetUpBoot);
|
||||||
|
|
||||||
|
CmiRegistryInitialized = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return(Status);
|
return(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue