https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4caf3913242a0c908c29e…
commit 4caf3913242a0c908c29e0cc34ea6464e8149f9d
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Oct 14 01:20:31 2018 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Oct 14 15:59:34 2018 +0200
[NTOS][MKHIVE] Minor code formatting.
---
ntoskrnl/config/cmapi.c | 6 +++---
sdk/tools/mkhive/registry.c | 50 ++++++++++++++++++++++-----------------------
2 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/ntoskrnl/config/cmapi.c b/ntoskrnl/config/cmapi.c
index 85723d1881..3b476d8c8e 100644
--- a/ntoskrnl/config/cmapi.c
+++ b/ntoskrnl/config/cmapi.c
@@ -982,7 +982,7 @@ CmDeleteValueKey(IN PCM_KEY_CONTROL_BLOCK Kcb,
}
/* Get the key value */
- Value = (PCM_KEY_VALUE)HvGetCell(Hive,ChildCell);
+ Value = (PCM_KEY_VALUE)HvGetCell(Hive, ChildCell);
ASSERT(Value);
/* Mark it and all related data as dirty */
@@ -1851,7 +1851,7 @@ CmDeleteKey(IN PCM_KEY_BODY KeyBody)
{
/* Don't do it twice */
Status = STATUS_SUCCESS;
- goto Quickie2;
+ goto Quickie;
}
/* Get the hive and node */
@@ -1925,7 +1925,7 @@ CmDeleteKey(IN PCM_KEY_BODY KeyBody)
CmpUnlockHiveFlusher((PCMHIVE)Hive);
/* Release the KCB locks */
-Quickie2:
+Quickie:
CmpReleaseTwoKcbLockByKey(Kcb->ConvKey, Kcb->ParentKcb->ConvKey);
/* Release hive lock */
diff --git a/sdk/tools/mkhive/registry.c b/sdk/tools/mkhive/registry.c
index 17030bb209..1686fca08d 100644
--- a/sdk/tools/mkhive/registry.c
+++ b/sdk/tools/mkhive/registry.c
@@ -370,7 +370,7 @@ LIST_ENTRY CmiHiveListHead;
LIST_ENTRY CmiReparsePointsHead;
static LONG
-RegpOpenOrCreateKey(
+RegpCreateOrOpenKey(
IN HKEY hParentKey,
IN PCWSTR KeyName,
IN BOOL AllowCreation,
@@ -390,7 +390,7 @@ RegpOpenOrCreateKey(
PCM_KEY_NODE SubKeyCell;
HCELL_INDEX BlockOffset;
- DPRINT("RegpCreateOpenKey('%S')\n", KeyName);
+ DPRINT("RegpCreateOrOpenKey('%S')\n", KeyName);
if (*KeyName == OBJ_NAME_PATH_SEPARATOR)
{
@@ -491,26 +491,7 @@ RegCreateKeyW(
IN LPCWSTR lpSubKey,
OUT PHKEY phkResult)
{
- return RegpOpenOrCreateKey(hKey, lpSubKey, TRUE, FALSE, phkResult);
-}
-
-LONG WINAPI
-RegDeleteKeyW(
- IN HKEY hKey,
- IN LPCWSTR lpSubKey)
-{
- DPRINT1("RegDeleteKeyW(0x%p, '%S') is UNIMPLEMENTED!\n",
- hKey, (lpSubKey ? lpSubKey : L""));
- return ERROR_SUCCESS;
-}
-
-LONG WINAPI
-RegOpenKeyW(
- IN HKEY hKey,
- IN LPCWSTR lpSubKey,
- OUT PHKEY phkResult)
-{
- return RegpOpenOrCreateKey(hKey, lpSubKey, FALSE, FALSE, phkResult);
+ return RegpCreateOrOpenKey(hKey, lpSubKey, TRUE, FALSE, phkResult);
}
LONG WINAPI
@@ -525,13 +506,32 @@ RegCreateKeyExW(
OUT PHKEY phkResult,
OUT LPDWORD lpdwDisposition OPTIONAL)
{
- return RegpOpenOrCreateKey(hKey,
+ return RegpCreateOrOpenKey(hKey,
lpSubKey,
TRUE,
(dwOptions & REG_OPTION_VOLATILE) != 0,
phkResult);
}
+LONG WINAPI
+RegDeleteKeyW(
+ IN HKEY hKey,
+ IN LPCWSTR lpSubKey)
+{
+ DPRINT1("RegDeleteKeyW(0x%p, '%S') is UNIMPLEMENTED!\n",
+ hKey, (lpSubKey ? lpSubKey : L""));
+ return ERROR_SUCCESS;
+}
+
+LONG WINAPI
+RegOpenKeyW(
+ IN HKEY hKey,
+ IN LPCWSTR lpSubKey,
+ OUT PHKEY phkResult)
+{
+ return RegpCreateOrOpenKey(hKey, lpSubKey, FALSE, FALSE, phkResult);
+}
+
LONG WINAPI
RegSetValueExW(
IN HKEY hKey,
@@ -785,9 +785,9 @@ ConnectRegistry(
IN PCWSTR Path)
{
NTSTATUS Status;
+ LONG rc;
PREPARSE_POINT ReparsePoint;
PMEMKEY NewKey;
- LONG rc;
ReparsePoint = (PREPARSE_POINT)malloc(sizeof(*ReparsePoint));
if (!ReparsePoint)
@@ -819,7 +819,7 @@ ConnectRegistry(
if (!NT_SUCCESS(Status))
DPRINT1("Failed to add security for root key '%S'\n", Path);
- /* Create key */
+ /* Create the key */
rc = RegCreateKeyExW(RootKey,
Path,
0,