Author: fireball Date: Thu Sep 20 14:36:36 2007 New Revision: 29114
URL: http://svn.reactos.org/svn/reactos?rev=29114&view=rev Log: - Implement a fast->slow leaf conversion (this assert was hit by OO.o setup)
Modified: trunk/reactos/ntoskrnl/config/cmindex.c
Modified: trunk/reactos/ntoskrnl/config/cmindex.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmindex.c?r... ============================================================================== --- trunk/reactos/ntoskrnl/config/cmindex.c (original) +++ trunk/reactos/ntoskrnl/config/cmindex.c Thu Sep 20 14:36:36 2007 @@ -1125,10 +1125,11 @@ { PCM_KEY_NODE KeyNode; PCM_KEY_INDEX Index; + PCM_KEY_FAST_INDEX OldIndex; UNICODE_STRING Name; HCELL_INDEX IndexCell = HCELL_NIL, CellToRelease = HCELL_NIL, LeafCell; PHCELL_INDEX RootPointer = NULL; - ULONG Type; + ULONG Type, i; BOOLEAN IsCompressed; PAGED_CODE();
@@ -1245,9 +1246,21 @@ if ((Index->Signature == CM_KEY_FAST_LEAF) && (Index->Count >= CmpMaxFastIndexPerHblock)) { - /* Not handled yet */ - DPRINT1("Fast->Slow Leaf Conversion not yet implemented!\n"); - ASSERT(FALSE); + DPRINT("Doing Fast->Slow Leaf conversion\n"); + + /* Mark this cell as dirty */ + HvMarkCellDirty(Hive, CellToRelease); + + /* Convert */ + OldIndex = (PCM_KEY_FAST_INDEX)Index; + + for (i=0; i < OldIndex->Count; i++) + { + Index->List[i] = OldIndex->List[i].Cell; + } + + /* Set the new type value */ + Index->Signature = CM_KEY_INDEX_LEAF; } else if (((Index->Signature == CM_KEY_INDEX_LEAF) || (Index->Signature == CM_KEY_HASH_LEAF)) &&