Author: ion
Date: Mon Aug 14 16:15:26 2006
New Revision: 23575
URL:
http://svn.reactos.org/svn/reactos?rev=23575&view=rev
Log:
- Fix small build brekage.
- Fix HBIN definition.
Modified:
trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c
trunk/reactos/lib/cmlib/cmdata.h
trunk/reactos/lib/cmlib/hivebin.c
trunk/reactos/lib/cmlib/hivecell.c
trunk/reactos/lib/cmlib/hivedata.h
trunk/reactos/lib/cmlib/hiveinit.c
trunk/reactos/ntoskrnl/cm/cm.h
trunk/reactos/ntoskrnl/cm/registry.c
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c Mon Aug 14 16:15:26 2006
@@ -787,8 +787,8 @@
{
Bin = (PHBIN)Hive->Storage[HvStable].BlockList[i].Bin;
memcpy (ChunkBase + (i + 1) * HV_BLOCK_SIZE,
- Bin, Bin->BinSize);
- Size += Bin->BinSize;
+ Bin, Bin->Size);
+ Size += Bin->Size;
}
}
Modified: trunk/reactos/lib/cmlib/cmdata.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmdata.h?rev=235…
==============================================================================
--- trunk/reactos/lib/cmlib/cmdata.h (original)
+++ trunk/reactos/lib/cmlib/cmdata.h Mon Aug 14 16:15:26 2006
@@ -133,16 +133,17 @@
#define REG_DATA_SIZE_MASK 0x7FFFFFFF
#define REG_DATA_IN_OFFSET 0x80000000
-typedef struct _SECURITY_CELL
+typedef struct _CM_KEY_SECURITY
{
- USHORT Id; // "sk"
- USHORT Reserved;
- HCELL_INDEX PrevSecurityCell;
- HCELL_INDEX NextSecurityCell;
- ULONG RefCount;
- ULONG SdSize;
- UCHAR Data[0];
-} SECURITY_CELL, *PSECURITY_CELL;
+ USHORT Signature; // "sk"
+ USHORT Reserved;
+ HCELL_INDEX Flink;
+ HCELL_INDEX Blink;
+ ULONG ReferenceCount;
+ ULONG DescriptorLength;
+ //SECURITY_DESCRIPTOR_RELATIVE Descriptor;
+ UCHAR Data[0];
+} CM_KEY_SECURITY, *PCM_KEY_SECURITY;
#include <poppack.h>
Modified: trunk/reactos/lib/cmlib/hivebin.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivebin.c?rev=23…
==============================================================================
--- trunk/reactos/lib/cmlib/hivebin.c (original)
+++ trunk/reactos/lib/cmlib/hivebin.c Mon Aug 14 16:15:26 2006
@@ -32,9 +32,9 @@
RtlZeroMemory(Bin, sizeof(HBIN));
Bin->Signature = HV_BIN_SIGNATURE;
- Bin->BinOffset = RegistryHive->Storage[Storage].Length *
+ Bin->FileOffset = RegistryHive->Storage[Storage].Length *
HV_BLOCK_SIZE;
- Bin->BinSize = BinSize;
+ Bin->Size = BinSize;
/* Allocate new block list */
OldBlockListSize = RegistryHive->Storage[Storage].Length;
@@ -90,7 +90,7 @@
/* Mark new bin dirty. */
RtlSetBits(&RegistryHive->DirtyVector,
- Bin->BinOffset / HV_BLOCK_SIZE,
+ Bin->FileOffset / HV_BLOCK_SIZE,
BlockCount);
}
Modified: trunk/reactos/lib/cmlib/hivecell.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivecell.c?rev=2…
==============================================================================
--- trunk/reactos/lib/cmlib/hivecell.c (original)
+++ trunk/reactos/lib/cmlib/hivecell.c Mon Aug 14 16:15:26 2006
@@ -242,12 +242,12 @@
/* Search free blocks and add to list */
FreeOffset = sizeof(HBIN);
- while (FreeOffset < Bin->BinSize)
+ while (FreeOffset < Bin->Size)
{
FreeBlock = (PCELL_HEADER)((ULONG_PTR)Bin + FreeOffset);
if (FreeBlock->CellSize > 0)
{
- Status = HvpAddFree(Hive, FreeBlock, Bin->BinOffset + FreeOffset);
+ Status = HvpAddFree(Hive, FreeBlock, Bin->FileOffset + FreeOffset);
if (!NT_SUCCESS(Status))
return Status;
@@ -259,8 +259,8 @@
}
}
- BlockIndex += Bin->BinSize / HV_BLOCK_SIZE;
- BlockOffset += Bin->BinSize;
+ BlockIndex += Bin->Size / HV_BLOCK_SIZE;
+ BlockOffset += Bin->Size;
}
return STATUS_SUCCESS;
@@ -291,7 +291,7 @@
Bin = HvpAddBin(RegistryHive, Size, Storage);
if (Bin == NULL)
return HCELL_NULL;
- FreeCellOffset = Bin->BinOffset + sizeof(HBIN);
+ FreeCellOffset = Bin->FileOffset + sizeof(HBIN);
FreeCellOffset |= Storage << HCELL_TYPE_SHIFT;
}
@@ -387,14 +387,14 @@
Bin = (PHBIN)RegistryHive->Storage[CellType].BlockList[CellBlock].Bin;
if ((CellIndex & ~HCELL_TYPE_MASK) + Free->CellSize <
- Bin->BinOffset + Bin->BinSize)
+ Bin->FileOffset + Bin->Size)
{
Neighbor = (PCELL_HEADER)((ULONG_PTR)Free + Free->CellSize);
if (Neighbor->CellSize > 0)
{
HvpRemoveFree(RegistryHive, Neighbor,
((HCELL_INDEX)Neighbor - (HCELL_INDEX)Bin +
- Bin->BinOffset) | (CellIndex & HCELL_TYPE_MASK));
+ Bin->FileOffset) | (CellIndex & HCELL_TYPE_MASK));
Free->CellSize += Neighbor->CellSize;
}
}
@@ -410,7 +410,7 @@
if (CellType == HvStable)
HvMarkCellDirty(RegistryHive,
(HCELL_INDEX)Neighbor - (HCELL_INDEX)Bin +
- Bin->BinOffset);
+ Bin->FileOffset);
return;
}
Neighbor = (PCELL_HEADER)((ULONG_PTR)Neighbor + Neighbor->CellSize);
Modified: trunk/reactos/lib/cmlib/hivedata.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivedata.h?rev=2…
==============================================================================
--- trunk/reactos/lib/cmlib/hivedata.h (original)
+++ trunk/reactos/lib/cmlib/hivedata.h Mon Aug 14 16:15:26 2006
@@ -99,21 +99,21 @@
ULONG BootRecover;
} HBASE_BLOCK, *PHBASE_BLOCK;
-typedef struct _BIN_HEADER
+typedef struct _HBIN
{
/* Bin identifier "hbin" (0x6E696268) */
ULONG Signature;
/* Block offset of this bin */
- HCELL_INDEX BinOffset;
+ HCELL_INDEX FileOffset;
/* Size in bytes, multiple of the block size (4KB) */
- ULONG BinSize;
+ ULONG Size;
- ULONG Reserved[2];
+ ULONG Reserved1[2];
/* When this bin was last modified */
- LARGE_INTEGER DateModified;
+ LARGE_INTEGER TimeStamp;
/* ? (In-memory only) */
ULONG MemAlloc;
Modified: trunk/reactos/lib/cmlib/hiveinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hiveinit.c?rev=2…
==============================================================================
--- trunk/reactos/lib/cmlib/hiveinit.c (original)
+++ trunk/reactos/lib/cmlib/hiveinit.c Mon Aug 14 16:15:26 2006
@@ -181,14 +181,14 @@
{
Bin = (PHBIN)((ULONG_PTR)ChunkBase + (BlockIndex + 1) * HV_BLOCK_SIZE);
if (Bin->Signature != HV_BIN_SIGNATURE ||
- (Bin->BinSize % HV_BLOCK_SIZE) != 0)
+ (Bin->Size % HV_BLOCK_SIZE) != 0)
{
Hive->Free(Hive->HiveHeader);
Hive->Free(Hive->Storage[HvStable].BlockList);
return STATUS_REGISTRY_CORRUPT;
}
- NewBin = Hive->Allocate(Bin->BinSize, TRUE);
+ NewBin = Hive->Allocate(Bin->Size, TRUE);
if (NewBin == NULL)
{
Hive->Free(Hive->HiveHeader);
@@ -199,11 +199,11 @@
Hive->Storage[HvStable].BlockList[BlockIndex].Bin = (ULONG_PTR)NewBin;
Hive->Storage[HvStable].BlockList[BlockIndex].Block = (ULONG_PTR)NewBin;
- RtlCopyMemory(NewBin, Bin, Bin->BinSize);
-
- if (Bin->BinSize > HV_BLOCK_SIZE)
- {
- for (i = 1; i < Bin->BinSize / HV_BLOCK_SIZE; i++)
+ RtlCopyMemory(NewBin, Bin, Bin->Size);
+
+ if (Bin->Size > HV_BLOCK_SIZE)
+ {
+ for (i = 1; i < Bin->Size / HV_BLOCK_SIZE; i++)
{
Hive->Storage[HvStable].BlockList[BlockIndex + i].Bin =
(ULONG_PTR)NewBin;
Hive->Storage[HvStable].BlockList[BlockIndex + i].Block =
@@ -211,7 +211,7 @@
}
}
- BlockIndex += Bin->BinSize / HV_BLOCK_SIZE;
+ BlockIndex += Bin->Size / HV_BLOCK_SIZE;
}
if (HvpCreateHiveFreeCellList(Hive))
Modified: trunk/reactos/ntoskrnl/cm/cm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/cm.h?rev=23575…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/cm.h (original)
+++ trunk/reactos/ntoskrnl/cm/cm.h Mon Aug 14 16:15:26 2006
@@ -43,7 +43,7 @@
PHHIVE Hive;
UNICODE_STRING HiveFileName;
UNICODE_STRING LogFileName;
- PSECURITY_CELL RootSecurityCell;
+ PCM_KEY_SECURITY RootSecurityCell;
ULONG Flags;
HANDLE HiveHandle;
HANDLE LogHandle;
Modified: trunk/reactos/ntoskrnl/cm/registry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/registry.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/registry.c (original)
+++ trunk/reactos/ntoskrnl/cm/registry.c Mon Aug 14 16:15:26 2006
@@ -164,7 +164,7 @@
UNICODE_STRING KeyName;
PKEY_OBJECT RootKey;
#if 0
- PSECURITY_CELL RootSecurityCell;
+ PCM_KEY_SECURITY RootSecurityCell;
#endif
HANDLE RootKeyHandle;
HANDLE KeyHandle;