[NTOS:IO]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 8 Apr 2017 09:26:42 +0000 (09:26 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 8 Apr 2017 09:26:42 +0000 (09:26 +0000)
- Make debug prints about IopOpenRegistryKeyEx failure consistent

svn path=/trunk/; revision=74283

reactos/ntoskrnl/io/iomgr/driver.c
reactos/ntoskrnl/io/pnpmgr/pnpinit.c
reactos/ntoskrnl/io/pnpmgr/pnproot.c

index 413458d..3617a6b 100644 (file)
@@ -337,7 +337,7 @@ IopLoadServiceModule(
         Status = IopOpenRegistryKeyEx(&CCSKey, NULL, &CCSName, KEY_READ);
         if (!NT_SUCCESS(Status))
         {
-            DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with Status %08X\n",
+            DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
                     &CCSName, Status);
             return Status;
         }
@@ -346,7 +346,7 @@ IopLoadServiceModule(
         Status = IopOpenRegistryKeyEx(&ServiceKey, CCSKey, ServiceName, KEY_READ);
         if (!NT_SUCCESS(Status))
         {
-            DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with Status %08X\n",
+            DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
                     ServiceName, Status);
             ZwClose(CCSKey);
             return Status;
@@ -656,7 +656,8 @@ IopAttachFilterDrivers(
                                   KEY_READ);
     if (!NT_SUCCESS(Status))
     {
-        DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
+        DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                &EnumRoot, Status);
         return Status;
     }
 
@@ -667,7 +668,8 @@ IopAttachFilterDrivers(
                                   KEY_READ);
     if (!NT_SUCCESS(Status))
     {
-        DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
+        DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                &DeviceNode->InstancePath, Status);
         ZwClose(EnumRootKey);
         return Status;
     }
@@ -731,7 +733,8 @@ IopAttachFilterDrivers(
                                       KEY_READ);
         if (!NT_SUCCESS(Status))
         {
-            DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
+            DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                    &ControlClass, Status);
             return Status;
         }
 
@@ -743,7 +746,8 @@ IopAttachFilterDrivers(
         if (!NT_SUCCESS(Status))
         {
             /* It's okay if there's no class key */
-            DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
+            DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                    &Class, Status);
             ZwClose(EnumRootKey);
             return STATUS_SUCCESS;
         }
index 1224abf..c002013 100644 (file)
@@ -268,7 +268,8 @@ PipCallDriverAddDevice(IN PDEVICE_NODE DeviceNode,
                                   KEY_READ);
     if (!NT_SUCCESS(Status))
     {
-        DPRINT1("IopOpenRegistryKeyEx() failed with Status %08X\n", Status);
+        DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                &EnumRoot, Status);
         return Status;
     }
 
@@ -280,7 +281,8 @@ PipCallDriverAddDevice(IN PDEVICE_NODE DeviceNode,
     ZwClose(EnumRootKey);
     if (!NT_SUCCESS(Status))
     {
-        DPRINT1("IopOpenRegistryKeyEx() failed with Status %08X\n", Status);
+        DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                &DeviceNode->InstancePath, Status);
         return Status;
     }
 
@@ -304,7 +306,8 @@ PipCallDriverAddDevice(IN PDEVICE_NODE DeviceNode,
         if (!NT_SUCCESS(Status))
         {
             /* No class key */
-            DPRINT1("IopOpenRegistryKeyEx() failed with Status %08X\n", Status);
+            DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                    &ControlClass, Status);
             ClassKey = NULL;
         }
         else
@@ -318,7 +321,8 @@ PipCallDriverAddDevice(IN PDEVICE_NODE DeviceNode,
             if (!NT_SUCCESS(Status))
             {
                 /* No class key */
-                DPRINT1("IopOpenRegistryKeyEx() failed with Status %08X\n", Status);
+                DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                        &ClassGuid, Status);
                 ClassKey = NULL;
             }
         }
@@ -336,7 +340,8 @@ PipCallDriverAddDevice(IN PDEVICE_NODE DeviceNode,
             if (!NT_SUCCESS(Status))
             {
                 /* No properties */
-                DPRINT("IopOpenRegistryKeyEx() failed with Status %08X\n", Status);
+                DPRINT("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                       &Properties, Status);
                 PropertiesKey = NULL;
             }
             else
index 398efdc..1731baa 100644 (file)
@@ -525,7 +525,8 @@ EnumerateDevices(
         Status = IopOpenRegistryKeyEx(&SubKeyHandle, KeyHandle, &SubKeyName, KEY_ENUMERATE_SUB_KEYS);
         if (!NT_SUCCESS(Status))
         {
-            DPRINT("IopOpenRegistryKeyEx() failed with status 0x%08lx\n", Status);
+            DPRINT("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                   &SubKeyName, Status);
             break;
         }
 
@@ -585,7 +586,8 @@ EnumerateDevices(
                 Status = IopOpenRegistryKeyEx(&DeviceKeyHandle, SubKeyHandle, &Device->InstanceID, KEY_READ);
                 if (!NT_SUCCESS(Status))
                 {
-                    DPRINT1("IopOpenRegistryKeyEx() failed with status 0x%08lx\n", Status);
+                    DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+                            &Device->InstanceID, Status);
                     break;
                 }