mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:05:42 +00:00
[MKHIVE] Minor code formatting.
This commit is contained in:
parent
d91a47826e
commit
8f82b00fa6
7 changed files with 38 additions and 21 deletions
|
@ -26,10 +26,10 @@
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "mkhive.h"
|
#include "mkhive.h"
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
ExportBinaryHive(
|
ExportBinaryHive(
|
||||||
IN PCSTR FileName,
|
IN PCSTR FileName,
|
||||||
|
|
|
@ -25,9 +25,13 @@
|
||||||
* Hermès Bélusca-Maïto
|
* Hermès Bélusca-Maïto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include "mkhive.h"
|
#include "mkhive.h"
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
PVOID
|
PVOID
|
||||||
NTAPI
|
NTAPI
|
||||||
CmpAllocate(
|
CmpAllocate(
|
||||||
|
@ -422,6 +426,7 @@ CmiAddValueKey(
|
||||||
{
|
{
|
||||||
*pValueCell = NewValueCell;
|
*pValueCell = NewValueCell;
|
||||||
*pValueCellOffset = NewValueCellOffset;
|
*pValueCellOffset = NewValueCellOffset;
|
||||||
|
Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
* PROGRAMMER: Hervé Poussineau
|
* PROGRAMMER: Hervé Poussineau
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#define VERIFY_KEY_CELL(key)
|
#define VERIFY_KEY_CELL(key)
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
* Hermès Bélusca-Maïto
|
* Hermès Bélusca-Maïto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -48,6 +50,7 @@
|
||||||
#define DIR_SEPARATOR_STRING "\\"
|
#define DIR_SEPARATOR_STRING "\\"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
void usage(void)
|
void usage(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,6 +67,7 @@ VOID NTAPI
|
||||||
RtlInitUnicodeString(
|
RtlInitUnicodeString(
|
||||||
IN OUT PUNICODE_STRING DestinationString,
|
IN OUT PUNICODE_STRING DestinationString,
|
||||||
IN PCWSTR SourceString);
|
IN PCWSTR SourceString);
|
||||||
|
|
||||||
WCHAR NTAPI
|
WCHAR NTAPI
|
||||||
RtlUpcaseUnicodeChar(
|
RtlUpcaseUnicodeChar(
|
||||||
IN WCHAR Source);
|
IN WCHAR Source);
|
||||||
|
|
|
@ -25,12 +25,35 @@
|
||||||
* Hermès Bélusca-Maïto
|
* Hermès Bélusca-Maïto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include "mkhive.h"
|
#include "mkhive.h"
|
||||||
|
|
||||||
|
/* DEFINITIONS AND DATA *****************************************************/
|
||||||
|
|
||||||
#define STATUS_NO_LOG_SPACE ((NTSTATUS)0xC000017D)
|
#define STATUS_NO_LOG_SPACE ((NTSTATUS)0xC000017D)
|
||||||
#define STATUS_CANNOT_DELETE ((NTSTATUS)0xC0000121)
|
#define STATUS_CANNOT_DELETE ((NTSTATUS)0xC0000121)
|
||||||
|
|
||||||
|
typedef struct _REPARSE_POINT
|
||||||
|
{
|
||||||
|
LIST_ENTRY ListEntry;
|
||||||
|
PCMHIVE SourceHive;
|
||||||
|
HCELL_INDEX SourceKeyCellOffset;
|
||||||
|
PCMHIVE DestinationHive;
|
||||||
|
HCELL_INDEX DestinationKeyCellOffset;
|
||||||
|
} REPARSE_POINT, *PREPARSE_POINT;
|
||||||
|
|
||||||
|
typedef struct _MEMKEY
|
||||||
|
{
|
||||||
|
/* Information on hard disk structure */
|
||||||
|
HCELL_INDEX KeyCellOffset;
|
||||||
|
PCMHIVE RegistryHive;
|
||||||
|
} MEMKEY, *PMEMKEY;
|
||||||
|
|
||||||
|
#define HKEY_TO_MEMKEY(hKey) ((PMEMKEY)(hKey))
|
||||||
|
#define MEMKEY_TO_HKEY(memKey) ((HKEY)(memKey))
|
||||||
|
|
||||||
static CMHIVE RootHive;
|
static CMHIVE RootHive;
|
||||||
static PMEMKEY RootKey;
|
static PMEMKEY RootKey;
|
||||||
|
|
||||||
|
@ -326,6 +349,7 @@ static UCHAR SystemSecurity[] =
|
||||||
0x01, 0x02, 0x00, 0x00
|
0x01, 0x02, 0x00, 0x00
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
HIVE_LIST_ENTRY RegistryHives[/*MAX_NUMBER_OF_REGISTRY_HIVES*/] =
|
HIVE_LIST_ENTRY RegistryHives[/*MAX_NUMBER_OF_REGISTRY_HIVES*/] =
|
||||||
{
|
{
|
||||||
|
@ -343,6 +367,7 @@ HIVE_LIST_ENTRY RegistryHives[/*MAX_NUMBER_OF_REGISTRY_HIVES*/] =
|
||||||
};
|
};
|
||||||
C_ASSERT(_countof(RegistryHives) == MAX_NUMBER_OF_REGISTRY_HIVES);
|
C_ASSERT(_countof(RegistryHives) == MAX_NUMBER_OF_REGISTRY_HIVES);
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
static PMEMKEY
|
static PMEMKEY
|
||||||
CreateInMemoryStructure(
|
CreateInMemoryStructure(
|
||||||
|
|
|
@ -7,25 +7,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
typedef struct _REPARSE_POINT
|
|
||||||
{
|
|
||||||
LIST_ENTRY ListEntry;
|
|
||||||
PCMHIVE SourceHive;
|
|
||||||
HCELL_INDEX SourceKeyCellOffset;
|
|
||||||
PCMHIVE DestinationHive;
|
|
||||||
HCELL_INDEX DestinationKeyCellOffset;
|
|
||||||
} REPARSE_POINT, *PREPARSE_POINT;
|
|
||||||
|
|
||||||
typedef struct _MEMKEY
|
|
||||||
{
|
|
||||||
/* Information on hard disk structure */
|
|
||||||
HCELL_INDEX KeyCellOffset;
|
|
||||||
PCMHIVE RegistryHive;
|
|
||||||
} MEMKEY, *PMEMKEY;
|
|
||||||
|
|
||||||
#define HKEY_TO_MEMKEY(hKey) ((PMEMKEY)(hKey))
|
|
||||||
#define MEMKEY_TO_HKEY(memKey) ((HKEY)(memKey))
|
|
||||||
|
|
||||||
typedef struct _HIVE_LIST_ENTRY
|
typedef struct _HIVE_LIST_ENTRY
|
||||||
{
|
{
|
||||||
PCSTR HiveName;
|
PCSTR HiveName;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue