Precision: r58138 was part 2a/3 of my changes.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 8 Jan 2013 00:35:26 +0000 (00:35 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 8 Jan 2013 00:35:26 +0000 (00:35 +0000)
[KERNEL32-RAMDISK]
Continue to use the new debugging macros introduced in r58132.

Part 2b/3

svn path=/trunk/; revision=58140

reactos/dll/win32/kernel32/client/path.c
reactos/dll/win32/kernel32/client/thread.c
reactos/drivers/storage/class/ramdisk/ramdisk.c

index 2229d3e..2c92cce 100644 (file)
@@ -236,9 +236,7 @@ BasepComputeProcessPath(IN PBASE_SEARCH_PATH_TYPE PathOrder,
                 if (NtCurrentTeb()->NtTib.SubSystemTib)
                 {
                     /* This means someone added RTL_PERTHREAD_CURDIR */
-                    UNIMPLEMENTED;
-                    ASSERT(FALSE);
-                    // while (TRUE);
+                    UNIMPLEMENTED_DBGBREAK();
                 }
 
                 /* We do not. Do we have the LDR_ENTRY for the executable? */
index c9d7f17..56da433 100644 (file)
@@ -238,10 +238,9 @@ CreateRemoteThread(IN HANDLE hProcess,
         if (!NT_SUCCESS(Status))
         {
             /* Fail */
-            DbgPrint("SXS: %s - Failing thread create because "
-                     "NtQueryInformationThread() failed with status %08lx\n",
-                     __FUNCTION__, Status);
-            ASSERT(FALSE); // while (TRUE);
+            ERROR_DBGBREAK("SXS: %s - Failing thread create because "
+                           "NtQueryInformationThread() failed with status %08lx\n",
+                           __FUNCTION__, Status);
             return NULL;
         }
 
@@ -250,10 +249,9 @@ CreateRemoteThread(IN HANDLE hProcess,
         if (!NT_SUCCESS(Status))
         {
             /* Fail */
-            DbgPrint("SXS: %s - Failing thread create because "
-                     "RtlAllocateActivationContextStack() failed with status %08lx\n",
-                     __FUNCTION__, Status);
-            ASSERT(FALSE); // while (TRUE);
+            ERROR_DBGBREAK("SXS: %s - Failing thread create because "
+                           "RtlAllocateActivationContextStack() failed with status %08lx\n",
+                           __FUNCTION__, Status);
             return NULL;
         }
 
@@ -273,10 +271,9 @@ CreateRemoteThread(IN HANDLE hProcess,
         if (!NT_SUCCESS(Status))
         {
             /* Fail */
-            DbgPrint("SXS: %s - Failing thread create because "
-                     "RtlQueryInformationActivationContext() failed with status %08lx\n",
-                     __FUNCTION__, Status);
-            ASSERT(FALSE); // while (TRUE);
+            ERROR_DBGBREAK("SXS: %s - Failing thread create because "
+                           "RtlQueryInformationActivationContext() failed with status %08lx\n",
+                           __FUNCTION__, Status);
             return NULL;
         }
 
@@ -291,10 +288,9 @@ CreateRemoteThread(IN HANDLE hProcess,
             if (!NT_SUCCESS(Status))
             {
                 /* Fail */
-                DbgPrint("SXS: %s - Failing thread create because "
-                         "RtlActivateActivationContextEx() failed with status %08lx\n",
-                         __FUNCTION__, Status);
-                ASSERT(FALSE); // while (TRUE);
+                ERROR_DBGBREAK("SXS: %s - Failing thread create because "
+                               "RtlActivateActivationContextEx() failed with status %08lx\n",
+                               __FUNCTION__, Status);
                 return NULL;
             }
         }
@@ -370,9 +366,8 @@ ExitThread(IN DWORD uExitCode)
     NtTerminateThread(NULL, uExitCode);
 
     /* We should never reach this place */
-    DPRINT1("It should not happen\n");
-    ASSERT(FALSE);
-    while (TRUE); // 'noreturn' function.
+    ERROR_FATAL("It should not happen\n");
+    while (TRUE); /* 'noreturn' function */
 }
 
 /*
index 06f6461..7b70972 100644 (file)
@@ -772,8 +772,7 @@ RamdiskCreateDiskDevice(IN PRAMDISK_BUS_EXTENSION DeviceExtension,
     }
     
 FailCreate:
-    UNIMPLEMENTED;
-    ASSERT(FALSE); // while (TRUE);
+    UNIMPLEMENTED_DBGBREAK();
     return STATUS_SUCCESS;
 }
 
@@ -1066,9 +1065,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject,
 
                     case IOCTL_DISK_GET_DRIVE_LAYOUT:
                         
-                        DPRINT1("Get drive layout request\n");
-                        UNIMPLEMENTED;
-                        ASSERT(FALSE); // while (TRUE);
+                        UNIMPLEMENTED_DBGBREAK("Get drive layout request\n");
                         break;
                         
                     case IOCTL_DISK_GET_PARTITION_INFO:
@@ -1078,9 +1075,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject,
 
                     default:
                         
-                        DPRINT1("Invalid request\n");
-                        UNIMPLEMENTED;
-                        ASSERT(FALSE); // while (TRUE);
+                        UNIMPLEMENTED_DBGBREAK("Invalid request\n");
                         break;
                 }
                 
@@ -1095,9 +1090,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject,
             case IRP_MJ_READ:
             case IRP_MJ_WRITE:
                 
-                DPRINT1("Read/Write request\n");
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK("Read/Write request\n");
                 break;
                 
             //
@@ -1105,9 +1098,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject,
             //
             case IRP_MJ_INTERNAL_DEVICE_CONTROL:
 
-                DPRINT1("SCSI request\n");
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK("SCSI request\n");
                 break;
                 
             //
@@ -1115,9 +1106,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject,
             //
             case IRP_MJ_FLUSH_BUFFERS:
                 
-                DPRINT1("Flush request\n");
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK("Flush request\n");
                 break;
 
             //
@@ -1125,9 +1114,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject,
             //
             default:
                 
-                DPRINT1("Invalid request: %lx\n", IoStackLocation->MajorFunction);
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK("Invalid request: %lx\n", IoStackLocation->MajorFunction);
                 break;
         }
         
@@ -1481,7 +1468,7 @@ RamdiskDeviceControl(IN PDEVICE_OBJECT DeviceObject,
                 //
                 // We don't handle anything else yet
                 //
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
         }
     }
     else
@@ -1496,8 +1483,7 @@ RamdiskDeviceControl(IN PDEVICE_OBJECT DeviceObject,
             case IOCTL_STORAGE_CHECK_VERIFY2:
             case IOCTL_CDROM_CHECK_VERIFY:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
 
             case IOCTL_STORAGE_GET_MEDIA_TYPES:
@@ -1662,68 +1648,57 @@ RamdiskDeviceControl(IN PDEVICE_OBJECT DeviceObject,
                 
             case IOCTL_DISK_GET_DRIVE_LAYOUT:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             case IOCTL_DISK_GET_LENGTH_INFO:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             case IOCTL_DISK_IS_WRITABLE:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             case IOCTL_SCSI_MINIPORT:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             case IOCTL_STORAGE_QUERY_PROPERTY:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             case IOCTL_MOUNTDEV_QUERY_UNIQUE_ID:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             case IOCTL_MOUNTDEV_QUERY_STABLE_GUID:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             case IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             case IOCTL_VOLUME_SET_GPT_ATTRIBUTES:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             case IOCTL_VOLUME_GET_GPT_ATTRIBUTES:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             case IOCTL_VOLUME_OFFLINE:
                 
-                UNIMPLEMENTED;
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK();
                 break;
                 
             default:
@@ -1791,8 +1766,7 @@ RamdiskQueryDeviceRelations(IN DEVICE_RELATION_TYPE Type,
         //
         // FIXME: TODO
         //
-        UNIMPLEMENTED;
-        ASSERT(FALSE); // while (TRUE);
+        UNIMPLEMENTED_DBGBREAK();
     }
     
     //
@@ -1978,8 +1952,7 @@ NTAPI
 RamdiskDeleteDiskDevice(IN PDEVICE_OBJECT DeviceObject,
                         IN PIRP Irp)
 {
-    UNIMPLEMENTED;
-    ASSERT(FALSE); // while (TRUE);
+    UNIMPLEMENTED_DBGBREAK();
     return STATUS_SUCCESS;
 }
 
@@ -2146,38 +2119,32 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject,
     {
         case IRP_MN_START_DEVICE:
             
-            DPRINT1("PnP IRP: %lx\n", Minor);
-            ASSERT(FALSE); // while (TRUE);
+            UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             break;
             
         case IRP_MN_QUERY_STOP_DEVICE:
             
-            DPRINT1("PnP IRP: %lx\n", Minor);
-            ASSERT(FALSE); // while (TRUE);
+            UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             break;
             
         case IRP_MN_CANCEL_STOP_DEVICE:
             
-            DPRINT1("PnP IRP: %lx\n", Minor);
-            ASSERT(FALSE); // while (TRUE);
+            UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             break;
             
         case IRP_MN_STOP_DEVICE:
             
-            DPRINT1("PnP IRP: %lx\n", Minor);
-            ASSERT(FALSE); // while (TRUE);
+            UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             break;
             
         case IRP_MN_QUERY_REMOVE_DEVICE:
             
-            DPRINT1("PnP IRP: %lx\n", Minor);
-            ASSERT(FALSE); // while (TRUE);
+            UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             break;
             
         case IRP_MN_CANCEL_REMOVE_DEVICE:
             
-            DPRINT1("PnP IRP: %lx\n", Minor);
-            ASSERT(FALSE); // while (TRUE);
+            UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             break;
             
         case IRP_MN_REMOVE_DEVICE:
@@ -2211,8 +2178,7 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject,
 
         case IRP_MN_SURPRISE_REMOVAL:
             
-            DPRINT1("PnP IRP: %lx\n", Minor);
-            ASSERT(FALSE); // while (TRUE);
+            UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             break;
             
         case IRP_MN_QUERY_ID:
@@ -2222,8 +2188,7 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject,
             //
             if (DeviceExtension->Type == RamdiskDrive)
             {
-                DPRINT1("PnP IRP: %lx\n", Minor);
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             }
             break;
             
@@ -2234,15 +2199,13 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject,
             //
             if (DeviceExtension->Type == RamdiskDrive)
             {
-                DPRINT1("PnP IRP: %lx\n", Minor);
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             }
             break;
             
         case IRP_MN_EJECT:
             
-            DPRINT1("PnP IRP: %lx\n", Minor);
-            ASSERT(FALSE); // while (TRUE);
+            UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             break;
             
         case IRP_MN_QUERY_DEVICE_TEXT:
@@ -2252,8 +2215,7 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject,
             //
             if (DeviceExtension->Type == RamdiskDrive)
             {
-                DPRINT1("PnP IRP: %lx\n", Minor);
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             }
             break;
             
@@ -2276,8 +2238,7 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject,
             //
             if (DeviceExtension->Type == RamdiskDrive)
             {
-                DPRINT1("PnP IRP: %lx\n", Minor);
-                ASSERT(FALSE); // while (TRUE);
+                UNIMPLEMENTED_DBGBREAK("PnP IRP: %lx\n", Minor);
             }
             break;