Call CmInit2() only if the system hive was imported.

svn path=/trunk/; revision=3830
This commit is contained in:
Eric Kohl 2002-12-07 14:47:10 +00:00
parent 1a57936f09
commit 822d5e3d78

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: main.c,v 1.143 2002/12/04 20:36:22 ekohl Exp $ /* $Id: main.c,v 1.144 2002/12/07 14:47:10 ekohl Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/main.c * FILE: ntoskrnl/ke/main.c
@ -297,6 +297,7 @@ ExpInitializeExecutive(VOID)
PCHAR name; PCHAR name;
CHAR str[50]; CHAR str[50];
NTSTATUS Status; NTSTATUS Status;
BOOLEAN SetupBoot;
/* /*
* Fail at runtime if someone has changed various structures without * Fail at runtime if someone has changed various structures without
@ -479,6 +480,7 @@ ExpInitializeExecutive(VOID)
} }
/* Pass 2: load registry chunks passed in */ /* Pass 2: load registry chunks passed in */
SetupBoot = TRUE;
for (i = 1; i < KeLoaderBlock.ModsCount; i++) for (i = 1; i < KeLoaderBlock.ModsCount; i++)
{ {
start = KeLoaderModules[i].ModStart; start = KeLoaderModules[i].ModStart;
@ -490,10 +492,18 @@ ExpInitializeExecutive(VOID)
CPRINT("Process registry chunk at %08lx\n", start); CPRINT("Process registry chunk at %08lx\n", start);
CmImportHive((PCHAR)start, length); CmImportHive((PCHAR)start, length);
} }
if (_stricmp(name, "system") == 0 ||
_stricmp(name, "system.hiv") == 0)
{
SetupBoot = FALSE;
}
} }
/* Initialize volatile registry settings */ /* Initialize volatile registry settings */
CmInit2((PCHAR)KeLoaderBlock.CommandLine); if (SetupBoot == TRUE)
{
CmInit2((PCHAR)KeLoaderBlock.CommandLine);
}
/* /*
* Enter the kernel debugger before starting up the boot drivers * Enter the kernel debugger before starting up the boot drivers