Author: jgardou Date: Sat Nov 19 17:20:39 2011 New Revision: 54444
URL: http://svn.reactos.org/svn/reactos?rev=54444&view=rev Log: [NTOSKRNL] - add some debug prints
Modified: trunk/reactos/ntoskrnl/config/cmapi.c trunk/reactos/ntoskrnl/config/cminit.c
Modified: trunk/reactos/ntoskrnl/config/cmapi.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmapi.c?rev... ============================================================================== --- trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] Sat Nov 19 17:20:39 2011 @@ -1787,6 +1787,7 @@ } else { + DPRINT1("CmpLinkHiveToMaster failed, Status %lx\n", Status); /* FIXME: TODO */ ASSERT(FALSE); }
Modified: trunk/reactos/ntoskrnl/config/cminit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cminit.c?re... ============================================================================== --- trunk/reactos/ntoskrnl/config/cminit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cminit.c [iso-8859-1] Sat Nov 19 17:20:39 2011 @@ -343,7 +343,19 @@ 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 @@ /* 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 */