Author: fireball
Date: Fri Dec 7 00:11:57 2007
New Revision: 31052
URL:
http://svn.reactos.org/svn/reactos?rev=31052&view=rev
Log:
- Replace KEY_OBJECT by real CM_KEY_BODY NT type.
Modified:
trunk/reactos/ntoskrnl/cm/ntfunc.c
trunk/reactos/ntoskrnl/cm/regobj.c
trunk/reactos/ntoskrnl/config/cm.h
trunk/reactos/ntoskrnl/config/cmapi.c
trunk/reactos/ntoskrnl/config/cmparse.c
trunk/reactos/ntoskrnl/config/cmsysini.c
trunk/reactos/ntoskrnl/config/ntapi.c
Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/ntfunc.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/ntfunc.c (original)
+++ trunk/reactos/ntoskrnl/cm/ntfunc.c Fri Dec 7 00:11:57 2007
@@ -44,7 +44,7 @@
{
UNICODE_STRING RemainingPath = {0}, ReturnedPath = {0};
ULONG LocalDisposition;
- PKEY_OBJECT KeyObject, Parent;
+ PCM_KEY_BODY KeyObject, Parent;
NTSTATUS Status = STATUS_SUCCESS;
UNICODE_STRING ObjectName;
OBJECT_CREATE_INFORMATION ObjectCreateInfo;
@@ -173,7 +173,7 @@
KeyObject->KeyControlBlock->ValueCache.Count = Node->ValueList.Count;
/* Link child to parent */
- InsertTailList(&Parent->KeyControlBlock->KeyBodyListHead,
&KeyObject->KeyBodyEntry);
+ InsertTailList(&Parent->KeyControlBlock->KeyBodyListHead,
&KeyObject->KeyBodyList);
/* Create the actual handle to the object */
Status = CmpCreateHandle(KeyObject,
@@ -217,7 +217,7 @@
{
UNICODE_STRING RemainingPath = {0};
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
- PKEY_OBJECT Object = NULL;
+ PCM_KEY_BODY Object = NULL;
HANDLE hKey = NULL;
NTSTATUS Status = STATUS_SUCCESS;
UNICODE_STRING ObjectName;
Modified: trunk/reactos/ntoskrnl/cm/regobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/regobj.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/regobj.c (original)
+++ trunk/reactos/ntoskrnl/cm/regobj.c Fri Dec 7 00:11:57 2007
@@ -441,9 +441,9 @@
CmiScanKeyList(PCM_KEY_CONTROL_BLOCK Parent,
PCUNICODE_STRING KeyName,
ULONG Attributes,
- PKEY_OBJECT* ReturnedObject)
+ PCM_KEY_BODY* ReturnedObject)
{
- PKEY_OBJECT CurKey = NULL;
+ PCM_KEY_BODY CurKey = NULL;
PCM_NAME_CONTROL_BLOCK Ncb;
PLIST_ENTRY NextEntry;
PWCHAR p, pp;
@@ -455,7 +455,7 @@
while (NextEntry != &Parent->KeyBodyListHead)
{
/* Get the current ReactOS Key Object */
- CurKey = CONTAINING_RECORD(NextEntry, KEY_OBJECT, KeyBodyEntry);
+ CurKey = CONTAINING_RECORD(NextEntry, CM_KEY_BODY, KeyBodyList);
/* Get the NCB */
Ncb = CurKey->KeyControlBlock->NameBlock;
@@ -542,8 +542,8 @@
OUT PVOID *NextObject)
{
HCELL_INDEX BlockOffset;
- PKEY_OBJECT FoundObject;
- PKEY_OBJECT ParsedKey;
+ PCM_KEY_BODY FoundObject;
+ PCM_KEY_BODY ParsedKey;
PCM_KEY_NODE SubKeyCell;
NTSTATUS Status;
PWSTR StartPtr;
@@ -573,8 +573,6 @@
}
ParsedKey = ParsedObject;
-
- VERIFY_KEY_OBJECT(ParsedKey);
*NextObject = NULL;
@@ -698,7 +696,7 @@
NULL,
KernelMode,
NULL,
- sizeof(KEY_OBJECT),
+ sizeof(CM_KEY_BODY),
0,
0,
(PVOID*)&FoundObject);
@@ -744,7 +742,7 @@
FoundObject->KeyControlBlock = Kcb;
ASSERT(FoundObject->KeyControlBlock->KeyHive ==
ParsedKey->KeyControlBlock->KeyHive);
- InsertTailList(&ParsedKey->KeyControlBlock->KeyBodyListHead,
&FoundObject->KeyBodyEntry);
+ InsertTailList(&ParsedKey->KeyControlBlock->KeyBodyListHead,
&FoundObject->KeyBodyList);
DPRINT("Created object 0x%p\n", FoundObject);
}
else
@@ -809,7 +807,6 @@
*Path = EndPtr;
- VERIFY_KEY_OBJECT(FoundObject);
*NextObject = FoundObject;
@@ -822,14 +819,14 @@
NTAPI
CmpDeleteKeyObject(PVOID DeletedObject)
{
- PKEY_OBJECT KeyObject;
+ PCM_KEY_BODY KeyObject;
REG_KEY_HANDLE_CLOSE_INFORMATION KeyHandleCloseInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
NTSTATUS Status;
DPRINT("Delete key object (%p)\n", DeletedObject);
- KeyObject = (PKEY_OBJECT) DeletedObject;
+ KeyObject = (PCM_KEY_BODY) DeletedObject;
PostOperationInfo.Object = (PVOID)KeyObject;
Modified: trunk/reactos/ntoskrnl/config/cm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cm.h?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cm.h (original)
+++ trunk/reactos/ntoskrnl/config/cm.h Fri Dec 7 00:11:57 2007
@@ -179,8 +179,7 @@
union
{
ULONG ValueList;
- //struct _CM_KEY_CONTROL_BLOCK *RealKcb;
- struct _KEY_OBJECT *RealKcb;
+ struct _CM_KEY_CONTROL_BLOCK *RealKcb;
};
} CACHED_CHILD_LIST, *PCACHED_CHILD_LIST;
@@ -490,11 +489,6 @@
//
// BUGBUG Old Hive Stuff for Temporary Support
//
-typedef struct _KEY_OBJECT
-{
- PCM_KEY_CONTROL_BLOCK KeyControlBlock;
- LIST_ENTRY KeyBodyEntry;
-} KEY_OBJECT, *PKEY_OBJECT;
NTSTATUS
NTAPI
CmFindObject(POBJECT_CREATE_INFORMATION ObjectCreateInfo,
@@ -884,13 +878,6 @@
IN ULONG Flags
);
-VOID
-NTAPI
-EnlistKeyBodyWithKeyObject(
- IN PKEY_OBJECT KeyObject,
- IN ULONG Flags
-);
-
NTSTATUS
NTAPI
CmpFreeKeyByCell(
@@ -1364,7 +1351,7 @@
IN POBJECT_ATTRIBUTES TargetKey,
IN POBJECT_ATTRIBUTES SourceFile,
IN ULONG Flags,
- IN PKEY_OBJECT KeyBody
+ IN PCM_KEY_BODY KeyBody
);
//
Modified: trunk/reactos/ntoskrnl/config/cmapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmapi.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmapi.c (original)
+++ trunk/reactos/ntoskrnl/config/cmapi.c Fri Dec 7 00:11:57 2007
@@ -1170,7 +1170,7 @@
CmLoadKey(IN POBJECT_ATTRIBUTES TargetKey,
IN POBJECT_ATTRIBUTES SourceFile,
IN ULONG Flags,
- IN PKEY_OBJECT KeyBody)
+ IN PCM_KEY_BODY KeyBody)
{
SECURITY_QUALITY_OF_SERVICE ServiceQos;
SECURITY_CLIENT_CONTEXT ClientSecurityContext;
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 (original)
+++ trunk/reactos/ntoskrnl/config/cmparse.c Fri Dec 7 00:11:57 2007
@@ -89,7 +89,7 @@
OUT PVOID *Object)
{
NTSTATUS Status = STATUS_SUCCESS;
- PKEY_OBJECT KeyBody;
+ PCM_KEY_BODY KeyBody;
HCELL_INDEX ClassCell = HCELL_NIL;
PCM_KEY_NODE KeyNode;
PCELL_DATA CellData;
@@ -160,12 +160,12 @@
NULL,
AccessMode,
NULL,
- sizeof(KEY_OBJECT),
+ sizeof(CM_KEY_BODY),
0,
0,
Object);
if (!NT_SUCCESS(Status)) goto Quickie;
- KeyBody = (PKEY_OBJECT)(*Object);
+ KeyBody = (PCM_KEY_BODY)(*Object);
/* Check if we had a class */
if (ParseContext->Class.Length > 0)
@@ -271,7 +271,7 @@
PCELL_DATA CellData;
HCELL_INDEX KeyCell;
ULONG ParentType;
- PKEY_OBJECT KeyBody;
+ PCM_KEY_BODY KeyBody;
PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
LARGE_INTEGER TimeStamp;
PCM_KEY_NODE KeyNode;
@@ -354,7 +354,7 @@
if (NT_SUCCESS(Status))
{
/* Get the key body */
- KeyBody = (PKEY_OBJECT)(*Object);
+ KeyBody = (PCM_KEY_BODY)(*Object);
/* Now add the subkey */
if (!CmpAddSubKey(Hive, Cell, KeyCell))
@@ -436,7 +436,7 @@
OUT PVOID *Object)
{
NTSTATUS Status;
- PKEY_OBJECT KeyBody = NULL;
+ PCM_KEY_BODY KeyBody = NULL;
PCM_KEY_CONTROL_BLOCK Kcb = NULL;
/* Make sure the hive isn't locked */
@@ -475,14 +475,14 @@
NULL,
AccessMode,
NULL,
- sizeof(KEY_OBJECT),
+ sizeof(CM_KEY_BODY),
0,
0,
Object);
if (NT_SUCCESS(Status))
{
/* Get the key body and fill it out */
- KeyBody = (PKEY_OBJECT)(*Object);
+ KeyBody = (PCM_KEY_BODY)(*Object);
KeyBody->KeyControlBlock = Kcb;
}
else
@@ -510,7 +510,7 @@
{
NTSTATUS Status;
HCELL_INDEX KeyCell, LinkCell, ChildCell;
- PKEY_OBJECT KeyBody;
+ PCM_KEY_BODY KeyBody;
LARGE_INTEGER TimeStamp;
PCM_KEY_NODE KeyNode;
PCM_KEY_CONTROL_BLOCK Kcb = ParentKcb;
@@ -693,7 +693,7 @@
}
/* Get the key body */
- KeyBody = (PKEY_OBJECT)*Object;
+ KeyBody = (PCM_KEY_BODY)*Object;
/* Sanity checks */
ASSERT(KeyBody->KeyControlBlock->ParentKcb->KeyCell == Cell);
@@ -849,7 +849,7 @@
}
/* Grab the KCB */
- Kcb = ((PKEY_OBJECT)ParseObject)->KeyControlBlock;
+ Kcb = ((PCM_KEY_BODY)ParseObject)->KeyControlBlock;
DPRINT1("KCB Parse: %p\n", Kcb);
/* Lookup in the cache */
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 (original)
+++ trunk/reactos/ntoskrnl/config/cmsysini.c Fri Dec 7 00:11:57 2007
@@ -492,8 +492,8 @@
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING RemainingPath;
- PKEY_OBJECT ParentKey;
- PKEY_OBJECT NewKey;
+ PCM_KEY_BODY ParentKey;
+ PCM_KEY_BODY NewKey;
NTSTATUS Status;
UNICODE_STRING ObjectName;
OBJECT_CREATE_INFORMATION ObjectCreateInfo;
@@ -609,7 +609,7 @@
ObReferenceObject(NewKey);
/* Link this key to the parent */
- InsertTailList(&ParentKey->KeyControlBlock->KeyBodyListHead,
&NewKey->KeyBodyEntry);
+ InsertTailList(&ParentKey->KeyControlBlock->KeyBodyListHead,
&NewKey->KeyBodyList);
return STATUS_SUCCESS;
}
@@ -840,11 +840,7 @@
{
UNICODE_STRING KeyName;
OBJECT_ATTRIBUTES ObjectAttributes;
-#if 0
PCM_KEY_BODY RootKey;
-#else
- PKEY_OBJECT RootKey;
-#endif
HCELL_INDEX RootIndex;
NTSTATUS Status;
PCM_KEY_NODE KeyCell;
@@ -872,7 +868,7 @@
&ObjectAttributes,
KernelMode,
NULL,
- sizeof(KEY_OBJECT),
+ sizeof(CM_KEY_BODY),
0,
0,
(PVOID*)&RootKey);
@@ -896,11 +892,9 @@
/* Initialize the object */
RootKey->KeyControlBlock = Kcb;
-#if 0
RootKey->Type = TAG('k', 'v', '0', '2');
RootKey->NotifyBlock = NULL;
RootKey->ProcessID = PsGetCurrentProcessId();
-#endif
/* Insert the key into the namespace */
Status = ObInsertObject(RootKey,
Modified: trunk/reactos/ntoskrnl/config/ntapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/ntapi.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/config/ntapi.c (original)
+++ trunk/reactos/ntoskrnl/config/ntapi.c Fri Dec 7 00:11:57 2007
@@ -22,7 +22,7 @@
NTAPI
NtDeleteKey(IN HANDLE KeyHandle)
{
- PKEY_OBJECT KeyObject;
+ PCM_KEY_BODY KeyObject;
NTSTATUS Status;
REG_DELETE_KEY_INFORMATION DeleteKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
@@ -81,7 +81,7 @@
OUT PULONG ResultLength)
{
NTSTATUS Status;
- PKEY_OBJECT KeyObject;
+ PCM_KEY_BODY KeyObject;
REG_ENUMERATE_KEY_INFORMATION EnumerateKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
PAGED_CODE();
@@ -142,7 +142,7 @@
OUT PULONG ResultLength)
{
NTSTATUS Status;
- PKEY_OBJECT KeyObject;
+ PCM_KEY_BODY KeyObject;
REG_ENUMERATE_VALUE_KEY_INFORMATION EnumerateValueKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
PAGED_CODE();
@@ -203,7 +203,7 @@
OUT PULONG ResultLength)
{
NTSTATUS Status;
- PKEY_OBJECT KeyObject;
+ PCM_KEY_BODY KeyObject;
REG_QUERY_KEY_INFORMATION QueryKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
PAGED_CODE();
@@ -265,7 +265,7 @@
OUT PULONG ResultLength)
{
NTSTATUS Status;
- PKEY_OBJECT KeyObject;
+ PCM_KEY_BODY KeyObject;
REG_QUERY_VALUE_KEY_INFORMATION QueryValueKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
PAGED_CODE();
@@ -328,7 +328,7 @@
IN ULONG DataSize)
{
NTSTATUS Status;
- PKEY_OBJECT KeyObject;
+ PCM_KEY_BODY KeyObject;
REG_SET_VALUE_KEY_INFORMATION SetValueKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
PAGED_CODE();
@@ -385,7 +385,7 @@
NtDeleteValueKey(IN HANDLE KeyHandle,
IN PUNICODE_STRING ValueName)
{
- PKEY_OBJECT KeyObject;
+ PCM_KEY_BODY KeyObject;
NTSTATUS Status;
REG_DELETE_VALUE_KEY_INFORMATION DeleteValueKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
@@ -433,7 +433,7 @@
NtFlushKey(IN HANDLE KeyHandle)
{
NTSTATUS Status;
- PKEY_OBJECT KeyObject;
+ PCM_KEY_BODY KeyObject;
PAGED_CODE();
/* Get the key object */
@@ -513,7 +513,7 @@
{
NTSTATUS Status;
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
- PKEY_OBJECT KeyBody = NULL;
+ PCM_KEY_BODY KeyBody = NULL;
PAGED_CODE();
/* Validate flags */