mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTOSKRNL:CONFIG]
CmShutdownSystem: Close all hive files after flushing the hives. svn path=/trunk/; revision=63897
This commit is contained in:
parent
cd26effabd
commit
50aa823cdb
1 changed files with 23 additions and 0 deletions
|
@ -2043,12 +2043,35 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
CmShutdownSystem(VOID)
|
CmShutdownSystem(VOID)
|
||||||
{
|
{
|
||||||
|
PLIST_ENTRY ListEntry;
|
||||||
|
PCMHIVE Hive;
|
||||||
|
ULONG i;
|
||||||
|
|
||||||
/* Kill the workers */
|
/* Kill the workers */
|
||||||
if (!CmFirstTime) CmpShutdownWorkers();
|
if (!CmFirstTime) CmpShutdownWorkers();
|
||||||
|
|
||||||
/* Flush all hives */
|
/* Flush all hives */
|
||||||
CmpLockRegistryExclusive();
|
CmpLockRegistryExclusive();
|
||||||
CmpDoFlushAll(TRUE);
|
CmpDoFlushAll(TRUE);
|
||||||
|
|
||||||
|
/* Close all hive files */
|
||||||
|
ListEntry = CmpHiveListHead.Flink;
|
||||||
|
while (ListEntry != &CmpHiveListHead)
|
||||||
|
{
|
||||||
|
Hive = CONTAINING_RECORD(ListEntry, CMHIVE, HiveList);
|
||||||
|
|
||||||
|
for (i = 0; i < HFILE_TYPE_MAX; i++)
|
||||||
|
{
|
||||||
|
if (Hive->FileHandles[i] != NULL)
|
||||||
|
{
|
||||||
|
ZwClose(Hive->FileHandles[i]);
|
||||||
|
Hive->FileHandles[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ListEntry = ListEntry->Flink;
|
||||||
|
}
|
||||||
|
|
||||||
CmpUnlockRegistry();
|
CmpUnlockRegistry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue