From f5b04e188146130cdf86b5dae312b69665adc2f0 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 21 Sep 2009 14:28:16 +0000 Subject: [PATCH] minor change to panic code --- kernel/utility.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/kernel/utility.c b/kernel/utility.c index b0aa38859..a061f6f4f 100755 --- a/kernel/utility.c +++ b/kernel/utility.c @@ -37,7 +37,7 @@ char *mess; int nr; { /* The system has run aground of a fatal kernel error. Terminate execution. */ - if (minix_panicing ++) return; /* prevent recursive panics */ +if (!minix_panicing++) { if (mess != NULL) { kprintf("kernel panic: %s", mess); @@ -46,8 +46,10 @@ int nr; kprintf("\n"); } + kprintf("proc_ptr %s / %d\n", proc_ptr->p_name, proc_ptr->p_endpoint); kprintf("kernel stacktrace: "); util_stacktrace(); +} /* Abort MINIX. */ minix_shutdown(NULL); @@ -80,12 +82,13 @@ int c; /* character to append */ kmess.km_next = (kmess.km_next + 1) % _KMESS_BUF_SIZE; } else { int p, outprocs[] = OUTPUT_PROCS_ARRAY; - if(do_serial_debug) return; - if(minix_panicing || do_serial_debug) return; - for(p = 0; outprocs[p] != NONE; p++) { - if(isokprocn(outprocs[p]) && !isemptyn(outprocs[p])) { - send_sig(outprocs[p], SIGKMESS); - } - } + if(!(minix_panicing || do_serial_debug)) { + for(p = 0; outprocs[p] != NONE; p++) { + if(isokprocn(outprocs[p]) && !isemptyn(outprocs[p])) { + send_sig(outprocs[p], SIGKMESS); + } + } + } } + return; } -- 2.44.0