mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTOS][MKHIVE] Minor code formatting.
This commit is contained in:
parent
bf8a7d2db0
commit
4caf391324
2 changed files with 28 additions and 28 deletions
|
@ -982,7 +982,7 @@ CmDeleteValueKey(IN PCM_KEY_CONTROL_BLOCK Kcb,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the key value */
|
/* Get the key value */
|
||||||
Value = (PCM_KEY_VALUE)HvGetCell(Hive,ChildCell);
|
Value = (PCM_KEY_VALUE)HvGetCell(Hive, ChildCell);
|
||||||
ASSERT(Value);
|
ASSERT(Value);
|
||||||
|
|
||||||
/* Mark it and all related data as dirty */
|
/* Mark it and all related data as dirty */
|
||||||
|
@ -1851,7 +1851,7 @@ CmDeleteKey(IN PCM_KEY_BODY KeyBody)
|
||||||
{
|
{
|
||||||
/* Don't do it twice */
|
/* Don't do it twice */
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
goto Quickie2;
|
goto Quickie;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the hive and node */
|
/* Get the hive and node */
|
||||||
|
@ -1925,7 +1925,7 @@ CmDeleteKey(IN PCM_KEY_BODY KeyBody)
|
||||||
CmpUnlockHiveFlusher((PCMHIVE)Hive);
|
CmpUnlockHiveFlusher((PCMHIVE)Hive);
|
||||||
|
|
||||||
/* Release the KCB locks */
|
/* Release the KCB locks */
|
||||||
Quickie2:
|
Quickie:
|
||||||
CmpReleaseTwoKcbLockByKey(Kcb->ConvKey, Kcb->ParentKcb->ConvKey);
|
CmpReleaseTwoKcbLockByKey(Kcb->ConvKey, Kcb->ParentKcb->ConvKey);
|
||||||
|
|
||||||
/* Release hive lock */
|
/* Release hive lock */
|
||||||
|
|
|
@ -370,7 +370,7 @@ LIST_ENTRY CmiHiveListHead;
|
||||||
LIST_ENTRY CmiReparsePointsHead;
|
LIST_ENTRY CmiReparsePointsHead;
|
||||||
|
|
||||||
static LONG
|
static LONG
|
||||||
RegpOpenOrCreateKey(
|
RegpCreateOrOpenKey(
|
||||||
IN HKEY hParentKey,
|
IN HKEY hParentKey,
|
||||||
IN PCWSTR KeyName,
|
IN PCWSTR KeyName,
|
||||||
IN BOOL AllowCreation,
|
IN BOOL AllowCreation,
|
||||||
|
@ -390,7 +390,7 @@ RegpOpenOrCreateKey(
|
||||||
PCM_KEY_NODE SubKeyCell;
|
PCM_KEY_NODE SubKeyCell;
|
||||||
HCELL_INDEX BlockOffset;
|
HCELL_INDEX BlockOffset;
|
||||||
|
|
||||||
DPRINT("RegpCreateOpenKey('%S')\n", KeyName);
|
DPRINT("RegpCreateOrOpenKey('%S')\n", KeyName);
|
||||||
|
|
||||||
if (*KeyName == OBJ_NAME_PATH_SEPARATOR)
|
if (*KeyName == OBJ_NAME_PATH_SEPARATOR)
|
||||||
{
|
{
|
||||||
|
@ -491,7 +491,26 @@ RegCreateKeyW(
|
||||||
IN LPCWSTR lpSubKey,
|
IN LPCWSTR lpSubKey,
|
||||||
OUT PHKEY phkResult)
|
OUT PHKEY phkResult)
|
||||||
{
|
{
|
||||||
return RegpOpenOrCreateKey(hKey, lpSubKey, TRUE, FALSE, phkResult);
|
return RegpCreateOrOpenKey(hKey, lpSubKey, TRUE, FALSE, phkResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
LONG WINAPI
|
||||||
|
RegCreateKeyExW(
|
||||||
|
IN HKEY hKey,
|
||||||
|
IN LPCWSTR lpSubKey,
|
||||||
|
IN DWORD Reserved,
|
||||||
|
IN LPWSTR lpClass OPTIONAL,
|
||||||
|
IN DWORD dwOptions,
|
||||||
|
IN REGSAM samDesired,
|
||||||
|
IN LPSECURITY_ATTRIBUTES lpSecurityAttributes OPTIONAL,
|
||||||
|
OUT PHKEY phkResult,
|
||||||
|
OUT LPDWORD lpdwDisposition OPTIONAL)
|
||||||
|
{
|
||||||
|
return RegpCreateOrOpenKey(hKey,
|
||||||
|
lpSubKey,
|
||||||
|
TRUE,
|
||||||
|
(dwOptions & REG_OPTION_VOLATILE) != 0,
|
||||||
|
phkResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
LONG WINAPI
|
LONG WINAPI
|
||||||
|
@ -510,26 +529,7 @@ RegOpenKeyW(
|
||||||
IN LPCWSTR lpSubKey,
|
IN LPCWSTR lpSubKey,
|
||||||
OUT PHKEY phkResult)
|
OUT PHKEY phkResult)
|
||||||
{
|
{
|
||||||
return RegpOpenOrCreateKey(hKey, lpSubKey, FALSE, FALSE, phkResult);
|
return RegpCreateOrOpenKey(hKey, lpSubKey, FALSE, FALSE, phkResult);
|
||||||
}
|
|
||||||
|
|
||||||
LONG WINAPI
|
|
||||||
RegCreateKeyExW(
|
|
||||||
IN HKEY hKey,
|
|
||||||
IN LPCWSTR lpSubKey,
|
|
||||||
IN DWORD Reserved,
|
|
||||||
IN LPWSTR lpClass OPTIONAL,
|
|
||||||
IN DWORD dwOptions,
|
|
||||||
IN REGSAM samDesired,
|
|
||||||
IN LPSECURITY_ATTRIBUTES lpSecurityAttributes OPTIONAL,
|
|
||||||
OUT PHKEY phkResult,
|
|
||||||
OUT LPDWORD lpdwDisposition OPTIONAL)
|
|
||||||
{
|
|
||||||
return RegpOpenOrCreateKey(hKey,
|
|
||||||
lpSubKey,
|
|
||||||
TRUE,
|
|
||||||
(dwOptions & REG_OPTION_VOLATILE) != 0,
|
|
||||||
phkResult);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LONG WINAPI
|
LONG WINAPI
|
||||||
|
@ -785,9 +785,9 @@ ConnectRegistry(
|
||||||
IN PCWSTR Path)
|
IN PCWSTR Path)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
LONG rc;
|
||||||
PREPARSE_POINT ReparsePoint;
|
PREPARSE_POINT ReparsePoint;
|
||||||
PMEMKEY NewKey;
|
PMEMKEY NewKey;
|
||||||
LONG rc;
|
|
||||||
|
|
||||||
ReparsePoint = (PREPARSE_POINT)malloc(sizeof(*ReparsePoint));
|
ReparsePoint = (PREPARSE_POINT)malloc(sizeof(*ReparsePoint));
|
||||||
if (!ReparsePoint)
|
if (!ReparsePoint)
|
||||||
|
@ -819,7 +819,7 @@ ConnectRegistry(
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
DPRINT1("Failed to add security for root key '%S'\n", Path);
|
DPRINT1("Failed to add security for root key '%S'\n", Path);
|
||||||
|
|
||||||
/* Create key */
|
/* Create the key */
|
||||||
rc = RegCreateKeyExW(RootKey,
|
rc = RegCreateKeyExW(RootKey,
|
||||||
Path,
|
Path,
|
||||||
0,
|
0,
|
||||||
|
|
Loading…
Reference in a new issue