[NTOSKRNL]

- add some debug prints

svn path=/trunk/; revision=54444
This commit is contained in:
Jérôme Gardou 2011-11-19 17:20:39 +00:00
parent 9e8dbbaa34
commit a1c0d36034
2 changed files with 24 additions and 13 deletions

View file

@ -1787,6 +1787,7 @@ CmLoadKey(IN POBJECT_ATTRIBUTES TargetKey,
}
else
{
DPRINT1("CmpLinkHiveToMaster failed, Status %lx\n", Status);
/* FIXME: TODO */
ASSERT(FALSE);
}

View file

@ -343,7 +343,19 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName,
FILE_SYNCHRONOUS_IO_NONALERT | IoFlags,
NULL,
0);
if ((NT_SUCCESS(Status)) && (MarkAsSystemHive))
/* Check if anything failed until now */
if (!NT_SUCCESS(Status))
{
/* Close handles and free buffers */
if (NameBuffer) ExFreePool(NameBuffer);
ObDereferenceObject(Event);
ZwClose(EventHandle);
DPRINT1("ZwCreateFile failed : %lx.\n", Status);
*Primary = NULL;
return Status;
}
if (MarkAsSystemHive)
{
/* We opened it, mark it as a system hive */
Status = ZwFsControlFile(*Primary,
@ -370,18 +382,16 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName,
/* If we don't support it, ignore the failure */
if (Status == STATUS_INVALID_DEVICE_REQUEST) Status = STATUS_SUCCESS;
/* If we failed, close the handle */
if (!NT_SUCCESS(Status)) ZwClose(*Primary);
}
/* Check if anything failed until now */
if (!NT_SUCCESS(Status))
{
/* Close handles and free buffers */
if (NameBuffer) ExFreePool(NameBuffer);
ObDereferenceObject(Event);
ZwClose(EventHandle);
return Status;
if (!NT_SUCCESS(Status))
{
/* Close handles and free buffers */
if (NameBuffer) ExFreePool(NameBuffer);
ObDereferenceObject(Event);
ZwClose(EventHandle);
ZwClose(*Primary);
*Primary = NULL;
return Status;
}
}
/* Disable compression */