diff --git a/reactos/ntoskrnl/ke/main.c b/reactos/ntoskrnl/ke/main.c index 8658db44b6a..6f3b81fed58 100644 --- a/reactos/ntoskrnl/ke/main.c +++ b/reactos/ntoskrnl/ke/main.c @@ -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; }