sync with trunk (r46275)
[reactos.git] / boot / freeldr / freeldr / debug.c
index 4053e45..0de49f5 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <debug.h>
 
-#if DBG
+#if DBG && !defined(_M_ARM)
 
 //#define DEBUG_ALL
 //#define DEBUG_INIFILE
@@ -173,6 +173,12 @@ VOID DebugPrintHeader(ULONG Mask)
        case DPRINT_HWDETECT:
            DbgPrint("HWDETECT: ");
                break;
+       case DPRINT_PELOADER:
+           DbgPrint("PELOADER: ");
+               break;
+       case DPRINT_SCSIPORT:
+           DbgPrint("SCSIPORT: ");
+               break;
        default:
            DbgPrint("UNKNOWN: ");
                break;
@@ -194,6 +200,12 @@ VOID DbgPrintMask(ULONG Mask, char *format, ...)
                return;
        }
 
+       // Disable file/line for scsiport messages
+       if (Mask & DPRINT_SCSIPORT)
+       {
+               DebugStartOfLine = FALSE;
+       }
+
        // Print the header if we have started a new line
        if (DebugStartOfLine)
        {
@@ -328,3 +340,22 @@ MsgBoxPrint(const char *Format, ...)
        return 0;
 }
 
+NTKERNELAPI
+DECLSPEC_NORETURN
+VOID
+NTAPI
+KeBugCheckEx(
+    IN ULONG  BugCheckCode,
+    IN ULONG_PTR  BugCheckParameter1,
+    IN ULONG_PTR  BugCheckParameter2,
+    IN ULONG_PTR  BugCheckParameter3,
+    IN ULONG_PTR  BugCheckParameter4)
+{
+    char Buffer[64];
+    sprintf(Buffer, "*** STOP: 0x%08lX (0x%08lX, 0x%08lX, 0x%08lX, 0x%08lX)",
+        BugCheckCode, BugCheckParameter1, BugCheckParameter2,
+        BugCheckParameter3, BugCheckParameter4);
+    UiMessageBoxCritical(Buffer);
+    assert(FALSE);
+    for (;;);
+}