From cb69c4c6919a57e93fddf0a9621584783ed40d06 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 2 Jun 2017 15:49:12 +0000 Subject: [PATCH] [NTOS] Add some DPRINTs in IopLoadServiceModule() and IopOpenRegistryKeyEx() to investigate why these 1st-stage text-mode hacks may be, or are (respectively) still needed. svn path=/branches/setup_improvements/; revision=74748 --- ntoskrnl/io/iomgr/driver.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ntoskrnl/io/iomgr/driver.c b/ntoskrnl/io/iomgr/driver.c index f9de2e5065a..fc133b0489e 100644 --- a/ntoskrnl/io/iomgr/driver.c +++ b/ntoskrnl/io/iomgr/driver.c @@ -322,6 +322,7 @@ IopLoadServiceModule( if (ExpInTextModeSetup) { /* We have no registry, but luckily we know where all the drivers are */ + DPRINT1("IopLoadServiceModule(%wZ, 0x%p) called in ExpInTextModeSetup mode...\n", ServiceName, ModuleObject); /* ServiceStart < 4 is all that matters */ ServiceStart = 0; @@ -1044,8 +1045,13 @@ IopInitializeBootDrivers(VOID) NULL, &BootEntry->RegistryPath, KEY_READ); + DPRINT1("IopOpenRegistryKeyEx(%wZ) returned 0x%08lx\n", &BootEntry->RegistryPath, Status); +#if 0 + if (NT_SUCCESS(Status)) +#else // Hack still needed... if ((NT_SUCCESS(Status)) || /* ReactOS HACK for SETUPLDR */ ((KeLoaderBlock->SetupLdrBlock) && ((KeyHandle = (PVOID)1)))) // yes, it's an assignment! +#endif { /* Save the handle */ DriverInfo->ServiceHandle = KeyHandle; @@ -1122,7 +1128,7 @@ IopInitializeSystemDrivers(VOID) PUNICODE_STRING *DriverList, *SavedList; /* No system drivers on the boot cd */ - if (KeLoaderBlock->SetupLdrBlock) return; + if (KeLoaderBlock->SetupLdrBlock) return; // ExpInTextModeSetup /* Get the driver list */ SavedList = DriverList = CmGetSystemDriverList(); -- 2.17.1