Author: hbelusca Date: Sun Jan 10 22:35:09 2016 New Revision: 70573
URL: http://svn.reactos.org/svn/reactos?rev=70573&view=rev Log: [NTOS:CONFIG] - Remove useless casts. - Fix a REG_OPTION_* hack.
Modified: trunk/reactos/ntoskrnl/config/cmparse.c trunk/reactos/ntoskrnl/config/cmsysini.c
Modified: trunk/reactos/ntoskrnl/config/cmparse.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmparse.c?r... ============================================================================== --- trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] Sun Jan 10 22:35:09 2016 @@ -225,7 +225,7 @@
/* Get the storage type */ StorageType = Stable; - if (Flags & REG_OPTION_VOLATILE) StorageType = Volatile; + if (ParseContext->CreateOptions & REG_OPTION_VOLATILE) StorageType = Volatile;
/* Allocate the child */ *KeyCell = HvAllocateCell(Hive, @@ -311,7 +311,7 @@
/* Fill out the key node */ KeyNode->Signature = CM_KEY_NODE_SIGNATURE; - KeyNode->Flags = Flags &~ REG_OPTION_CREATE_LINK; + KeyNode->Flags = Flags; KeQuerySystemTime(&SystemTime); KeyNode->LastWriteTime = SystemTime; KeyNode->Spare = 0; @@ -474,7 +474,7 @@ AccessMode, ParseContext, ParentKcb, - ParseContext->CreateOptions, // WRONG! + 0, &KeyCell, Object); if (NT_SUCCESS(Status))
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] Sun Jan 10 22:35:09 2016 @@ -350,7 +350,7 @@ }
/* Initialize the hive */ - Status = CmpInitializeHive((PCMHIVE*)&NewHive, + Status = CmpInitializeHive(&NewHive, Operation, HiveFlags, FileType, @@ -904,7 +904,7 @@ if (HiveBase) { /* Import it */ - Status = CmpInitializeHive((PCMHIVE*)&SystemHive, + Status = CmpInitializeHive(&SystemHive, HINIT_MEMORY, HIVE_NOLAZYFLUSH, HFILE_TYPE_LOG, @@ -975,7 +975,7 @@ RtlInitUnicodeString(&KeyName, L"\Registry\Machine\SYSTEM"); Status = CmpLinkHiveToMaster(&KeyName, NULL, - (PCMHIVE)SystemHive, + SystemHive, Allocate, SecurityDescriptor);
@@ -984,7 +984,7 @@ if (!NT_SUCCESS(Status)) return FALSE;
/* Add the hive to the hive list */ - CmpMachineHiveList[3].CmHive = (PCMHIVE)SystemHive; + CmpMachineHiveList[3].CmHive = SystemHive;
/* Success! */ return TRUE; @@ -1711,7 +1711,7 @@ }
/* Create the hardware hive */ - Status = CmpInitializeHive((PCMHIVE*)&HardwareHive, + Status = CmpInitializeHive(&HardwareHive, HINIT_CREATE, HIVE_VOLATILE, HFILE_TYPE_PRIMARY, @@ -1728,13 +1728,13 @@ }
/* Add the hive to the hive list */ - CmpMachineHiveList[0].CmHive = (PCMHIVE)HardwareHive; + CmpMachineHiveList[0].CmHive = HardwareHive;
/* Attach it to the machine key */ RtlInitUnicodeString(&KeyName, L"\Registry\Machine\HARDWARE"); Status = CmpLinkHiveToMaster(&KeyName, NULL, - (PCMHIVE)HardwareHive, + HardwareHive, TRUE, SecurityDescriptor); if (!NT_SUCCESS(Status))