Fixed buggy system hive identification.

svn path=/trunk/; revision=3862
This commit is contained in:
Eric Kohl 2002-12-09 23:09:25 +00:00
parent 8f1bfbccb6
commit 2b0a6b6d38

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: main.c,v 1.145 2002/12/07 15:43:29 ekohl Exp $
/* $Id: main.c,v 1.146 2002/12/09 23:09:25 ekohl Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/main.c
@ -105,6 +105,26 @@ RtlpCheckFileNameExtension(PCHAR FileName,
}
static BOOLEAN
RtlpIsSystemHive(PCHAR FileName)
{
PCHAR Name;
Name = strrchr(FileName, '\\');
if (Name == NULL)
{
Name = FileName;
}
else
{
Name = Name + 1;
}
return((_stricmp(Name, "system.hiv") == 0) ||
(_stricmp(Name, "system") == 0));
}
static VOID
InitSystemSharedUserPage (PCSZ ParameterLine)
{
@ -492,8 +512,7 @@ ExpInitializeExecutive(VOID)
CPRINT("Process registry chunk at %08lx\n", start);
CmImportHive((PCHAR)start, length);
}
if (_stricmp(name, "system") == 0 ||
_stricmp(name, "system.hiv") == 0)
if (RtlpIsSystemHive(name))
{
SetupBoot = FALSE;
}