X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fdebug.c;h=49600c20e565a8a68b3bd37545a95cc381e7de3b;hb=7143c19c04c283251ce32cd3226f04d69428cee3;hp=fe063c840bdc535e994bbee68d28c4ffba7a4650;hpb=8e1f78107cc9aa137de29e0c9df3a1fccb483b67;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/debug.c b/KernelLand/Kernel/debug.c index fe063c84..49600c20 100644 --- a/KernelLand/Kernel/debug.c +++ b/KernelLand/Kernel/debug.c @@ -42,7 +42,10 @@ static void Debug_Putchar(char ch) { Debug_PutCharDebug(ch); - if( !gbDebug_IsKPanic ) + if( gbDebug_IsKPanic ) + KernelPanic_PutChar(ch); + + if( gbDebug_IsKPanic < 2 ) { if(gbInPutChar) return ; gbInPutChar = 1; @@ -50,8 +53,6 @@ static void Debug_Putchar(char ch) VFS_Write(giDebug_KTerm, 1, &ch); gbInPutChar = 0; } - else - KernelPanic_PutChar(ch); if( gbSendNetworkDebug ) { @@ -78,7 +79,7 @@ static void Debug_Puts(int UseKTerm, const char *Str) IPStack_SendDebugText(Str); // Output to the kernel terminal - if( UseKTerm && !gbDebug_IsKPanic && giDebug_KTerm != -1) + if( UseKTerm && gbDebug_IsKPanic < 2 && giDebug_KTerm != -1) { if(gbInPutChar) return ; gbInPutChar = 1; @@ -117,7 +118,7 @@ void Debug_KernelPanic(void) #if LOCK_DEBUG_OUTPUT SHORTREL(&glDebug_Lock); #endif - gbDebug_IsKPanic = 1; + gbDebug_IsKPanic ++; KernelPanic_SetMode(); }