Author: ion
Date: Sun Oct 4 20:23:25 2015
New Revision: 69445
URL: http://svn.reactos.org/svn/reactos?rev=69445&view=rev
Log:
[MKHIVE]:
- Whoever wrote mkhive ran into the problem I just did, and realized hey-i-dont-fucking-want-to-use-that-almost-copy-pasted-but-not-shared-code-so-why-dont-i-use-the-good-kernel-code-instead... but instead of taking the time to create a fucking library like I just did (cause that would be hard man, and fixing headers n' shit), just hard-coded the paths to the kernel files directly like a lazy shit. Fix mkhive to just rely on cmlib, which now has the files shared there.
Removed:
trunk/reactos/tools/mkhive/cmindex.c
trunk/reactos/tools/mkhive/cmname.c
Modified:
trunk/reactos/tools/mkhive/CMakeLists.txt
Modified: trunk/reactos/tools/mkhive/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/CMakeLists.tx…
==============================================================================
--- trunk/reactos/tools/mkhive/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/CMakeLists.txt [iso-8859-1] Sun Oct 4 20:23:25 2015
@@ -9,8 +9,6 @@
list(APPEND SOURCE
binhive.c
cmi.c
- cmindex.c
- cmname.c
mkhive.c
reginf.c
registry.c
Removed: trunk/reactos/tools/mkhive/cmindex.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/cmindex.c?rev…
==============================================================================
--- trunk/reactos/tools/mkhive/cmindex.c [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/cmindex.c (removed)
@@ -1 +0,0 @@
-#include "../../ntoskrnl/config/cmindex.c"
Removed: trunk/reactos/tools/mkhive/cmname.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/cmname.c?rev=…
==============================================================================
--- trunk/reactos/tools/mkhive/cmname.c [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/cmname.c (removed)
@@ -1 +0,0 @@
-#include "../../ntoskrnl/config/cmname.c"
Author: ion
Date: Sun Oct 4 17:13:38 2015
New Revision: 69441
URL: http://svn.reactos.org/svn/reactos?rev=69441&view=rev
Log:
[NTOSKRNL]: Jerome _was_ nice enough to make our cells ordered (64222).
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?…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmindex.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmindex.c [iso-8859-1] Sun Oct 4 17:13:38 2015
@@ -11,8 +11,6 @@
#include "ntoskrnl.h"
#define NDEBUG
#include "debug.h"
-
-#define SOMEONE_WAS_NICE_ENOUGH_TO_MAKE_OUR_CELLS_LEXICALLY_SORTED
/* GLOBALS *******************************************************************/
@@ -161,9 +159,7 @@
while (TRUE)
{
/* Choose next entry */
-#ifdef SOMEONE_WAS_NICE_ENOUGH_TO_MAKE_OUR_CELLS_LEXICALLY_SORTED
i = ((High - Low) / 2) + Low;
-#endif
/* Get the leaf cell and then the leaf itself */
LeafCell = Index->List[i];
@@ -193,7 +189,6 @@
goto Return;
}
-#ifdef SOMEONE_WAS_NICE_ENOUGH_TO_MAKE_OUR_CELLS_LEXICALLY_SORTED
/* Check for negative result */
if (Result < 0)
{
@@ -232,7 +227,6 @@
/* Update the base to this index, since we know it's not lower. */
Low = i;
}
-#endif
}
else
{
@@ -247,16 +241,6 @@
/* Release the leaf cell */
HvReleaseCell(Hive, LeafCell);
-
-#ifndef SOMEONE_WAS_NICE_ENOUGH_TO_MAKE_OUR_CELLS_LEXICALLY_SORTED
- /* Go to the next index, and return failure if we reach the end */
- if (++i > High)
- {
- /* Return failure */
- *SubKey = HCELL_NIL;
- return 0;
- }
-#endif
}
/* Make sure we got here for the right reasons */
@@ -386,11 +370,7 @@
/* Get the upper bound and middle entry */
High = Index->Count - 1;
-#ifdef SOMEONE_WAS_NICE_ENOUGH_TO_MAKE_OUR_CELLS_LEXICALLY_SORTED
i = High / 2;
-#else
- i = 0;
-#endif
/* Check if we don't actually have any entries */
if (!Index->Count)
@@ -415,7 +395,6 @@
/* Check if we got lucky and found it */
if (!Result) return i;
-#ifdef SOMEONE_WAS_NICE_ENOUGH_TO_MAKE_OUR_CELLS_LEXICALLY_SORTED
/* Check if the result is below us */
if (Result < 0)
{
@@ -435,14 +414,6 @@
/* Set the new index */
i = ((High - Low) / 2) + Low;
-#else
- if (++i > High)
- {
- /* Return failure */
- *SubKey = HCELL_NIL;
- return 0;
- }
-#endif
}
/*
@@ -735,33 +706,6 @@
/* Check if this is another index root */
if (IndexRoot->Signature == CM_KEY_INDEX_ROOT)
{
-
-#ifndef SOMEONE_WAS_NICE_ENOUGH_TO_MAKE_OUR_CELLS_LEXICALLY_SORTED
- /* CmpFindSubKeyInRoot is useless for actually finding the correct leaf when keys are not sorted */
- LONG ii;
- PCM_KEY_INDEX Leaf;
- /* Loop through each leaf in the index root */
- for (ii=0; ii<IndexRoot->Count; ii++)
- {
- Leaf = HvGetCell(Hive, IndexRoot->List[ii]);
- if (Leaf)
- {
- Found = CmpFindSubKeyInLeaf(Hive, Leaf, SearchName, &SubKey);
- HvReleaseCell(Hive, IndexRoot->List[ii]);
- if (Found & 0x80000000)
- {
- HvReleaseCell(Hive, CellToRelease);
- return HCELL_NIL;
- }
-
- if (SubKey != HCELL_NIL)
- {
- HvReleaseCell(Hive, CellToRelease);
- return SubKey;
- }
- }
- }
-#endif
/* Lookup the name in the root */
Found = CmpFindSubKeyInRoot(Hive,
IndexRoot,