Author: hbelusca
Date: Fri May 30 21:47:22 2014
New Revision: 63506
URL:
http://svn.reactos.org/svn/reactos?rev=63506&view=rev
Log:
[NTOS:CM]
Replace a hardcoded value with something more readable.
Modified:
trunk/reactos/ntoskrnl/config/cmkcbncb.c
trunk/reactos/ntoskrnl/config/cmparse.c
trunk/reactos/ntoskrnl/config/cmsysini.c
trunk/reactos/ntoskrnl/include/internal/cm.h
Modified: trunk/reactos/ntoskrnl/config/cmkcbncb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmkcbncb.c…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmkcbncb.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmkcbncb.c [iso-8859-1] Fri May 30 21:47:22 2014
@@ -1164,7 +1164,7 @@
{
/* Get the key body */
KeyBody = CONTAINING_RECORD(NextEntry, CM_KEY_BODY, KeyBodyList);
- ASSERT(KeyBody->Type == '20yk');
+ ASSERT(KeyBody->Type == CM_KEY_BODY_TYPE);
/* Check for notifications */
if (KeyBody->NotifyBlock)
Modified: trunk/reactos/ntoskrnl/config/cmparse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmparse.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] Fri May 30 21:47:22 2014
@@ -286,7 +286,7 @@
/* Setup the key body */
KeyBody = (PCM_KEY_BODY)(*Object);
- KeyBody->Type = '20yk';
+ KeyBody->Type = CM_KEY_BODY_TYPE;
KeyBody->KeyControlBlock = NULL;
/* Check if we had a class */
@@ -691,7 +691,7 @@
/* Get the key body and fill it out */
KeyBody = (PCM_KEY_BODY)(*Object);
KeyBody->KeyControlBlock = Kcb;
- KeyBody->Type = '20yk';
+ KeyBody->Type = CM_KEY_BODY_TYPE;
KeyBody->ProcessID = PsGetCurrentProcessId();
KeyBody->NotifyBlock = NULL;
Modified: trunk/reactos/ntoskrnl/config/cmsysini.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] Fri May 30 21:47:22 2014
@@ -129,7 +129,7 @@
CmpLockRegistry();
/* Make sure this is a valid key body */
- if (KeyBody->Type == '20yk')
+ if (KeyBody->Type == CM_KEY_BODY_TYPE)
{
/* Get the KCB */
Kcb = KeyBody->KeyControlBlock;
@@ -166,7 +166,7 @@
if (SystemHandleCount > 1) return;
/* Make sure we're a valid key body */
- if (KeyBody->Type == '20yk')
+ if (KeyBody->Type == CM_KEY_BODY_TYPE)
{
/* Don't do anything if we don't have a notify block */
if (!KeyBody->NotifyBlock) return;
@@ -1056,7 +1056,7 @@
/* Initialize the object */
RootKey->KeyControlBlock = Kcb;
- RootKey->Type = '20yk';
+ RootKey->Type = CM_KEY_BODY_TYPE;
RootKey->NotifyBlock = NULL;
RootKey->ProcessID = PsGetCurrentProcessId();
Modified: trunk/reactos/ntoskrnl/include/internal/cm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/cm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/cm.h [iso-8859-1] Fri May 30 21:47:22 2014
@@ -59,6 +59,11 @@
#define CM_KCB_NO_DELAY_CLOSE 0x20
#define CM_KCB_INVALID_CACHED_INFO 0x40
#define CM_KCB_READ_ONLY_KEY 0x80
+
+//
+// CM_KEY_BODY Types
+//
+#define CM_KEY_BODY_TYPE 0x6B793032
//
// CM_KEY_VALUE Types