mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 14:43:02 +00:00
[NTOS]: Improve some DPRINTs, and variables naming + buffer data type in CmpAddToHiveFileList().
svn path=/trunk/; revision=75139
This commit is contained in:
parent
b17ce9c805
commit
e4ca76000c
1 changed files with 8 additions and 8 deletions
|
@ -134,9 +134,9 @@ CmpAddToHiveFileList(IN PCMHIVE Hive)
|
||||||
HANDLE KeyHandle;
|
HANDLE KeyHandle;
|
||||||
UNICODE_STRING HivePath;
|
UNICODE_STRING HivePath;
|
||||||
PWCHAR FilePath;
|
PWCHAR FilePath;
|
||||||
CHAR Buffer[sizeof(OBJECT_NAME_INFORMATION) + 512 * sizeof(WCHAR)];
|
UCHAR Buffer[sizeof(OBJECT_NAME_INFORMATION) + MAX_PATH * sizeof(WCHAR)];
|
||||||
ULONG Length = sizeof(Buffer);
|
ULONG Length = sizeof(Buffer);
|
||||||
POBJECT_NAME_INFORMATION LocalNameInfo = (POBJECT_NAME_INFORMATION)&Buffer;
|
POBJECT_NAME_INFORMATION FileNameInfo = (POBJECT_NAME_INFORMATION)&Buffer;
|
||||||
HivePath.Buffer = NULL;
|
HivePath.Buffer = NULL;
|
||||||
|
|
||||||
/* Create or open the hive list key */
|
/* Create or open the hive list key */
|
||||||
|
@ -155,7 +155,7 @@ CmpAddToHiveFileList(IN PCMHIVE Hive)
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* Fail */
|
/* Fail */
|
||||||
DPRINT1("CmpAddToHiveFileList: Creation or opening of the hive list failed, status = %08lx\n", Status);
|
DPRINT1("CmpAddToHiveFileList: Creation or opening of the hive list failed, status = 0x%08lx\n", Status);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,21 +174,21 @@ CmpAddToHiveFileList(IN PCMHIVE Hive)
|
||||||
/* Try to get the value */
|
/* Try to get the value */
|
||||||
Status = ZwQueryObject(Hive->FileHandles[HFILE_TYPE_PRIMARY],
|
Status = ZwQueryObject(Hive->FileHandles[HFILE_TYPE_PRIMARY],
|
||||||
ObjectNameInformation,
|
ObjectNameInformation,
|
||||||
LocalNameInfo,
|
FileNameInfo,
|
||||||
Length,
|
Length,
|
||||||
&Length);
|
&Length);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* Null-terminate and add the length of the terminator */
|
/* Null-terminate and add the length of the terminator */
|
||||||
Length -= sizeof(OBJECT_NAME_INFORMATION);
|
Length -= sizeof(OBJECT_NAME_INFORMATION);
|
||||||
FilePath = LocalNameInfo->Name.Buffer;
|
FilePath = FileNameInfo->Name.Buffer;
|
||||||
FilePath[Length / sizeof(WCHAR)] = UNICODE_NULL;
|
FilePath[Length / sizeof(WCHAR)] = UNICODE_NULL;
|
||||||
Length += sizeof(UNICODE_NULL);
|
Length += sizeof(UNICODE_NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Fail */
|
/* Fail */
|
||||||
DPRINT1("CmpAddToHiveFileList: Hive file name query failed, status = %08lx\n", Status);
|
DPRINT1("CmpAddToHiveFileList: Hive file name query failed, status = 0x%08lx\n", Status);
|
||||||
goto Quickie;
|
goto Quickie;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ CmpAddToHiveFileList(IN PCMHIVE Hive)
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* Fail */
|
/* Fail */
|
||||||
DPRINT1("CmpAddToHiveFileList: Setting of entry in the hive list failed, status = %08lx\n", Status);
|
DPRINT1("CmpAddToHiveFileList: Setting of entry in the hive list failed, status = 0x%08lx\n", Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
Quickie:
|
Quickie:
|
||||||
|
@ -240,7 +240,7 @@ CmpRemoveFromHiveFileList(IN PCMHIVE Hive)
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* Fail */
|
/* Fail */
|
||||||
DPRINT1("CmpRemoveFromHiveFileList: Opening of the hive list failed, status = %08lx\n", Status);
|
DPRINT1("CmpRemoveFromHiveFileList: Opening of the hive list failed, status = 0x%08lx\n", Status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue