minor change to panic code
This commit is contained in:
parent
ad4fc01b7b
commit
f5b04e1881
1 changed files with 11 additions and 8 deletions
|
@ -37,7 +37,7 @@ char *mess;
|
||||||
int nr;
|
int nr;
|
||||||
{
|
{
|
||||||
/* The system has run aground of a fatal kernel error. Terminate execution. */
|
/* 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) {
|
if (mess != NULL) {
|
||||||
kprintf("kernel panic: %s", mess);
|
kprintf("kernel panic: %s", mess);
|
||||||
|
@ -46,8 +46,10 @@ int nr;
|
||||||
kprintf("\n");
|
kprintf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kprintf("proc_ptr %s / %d\n", proc_ptr->p_name, proc_ptr->p_endpoint);
|
||||||
kprintf("kernel stacktrace: ");
|
kprintf("kernel stacktrace: ");
|
||||||
util_stacktrace();
|
util_stacktrace();
|
||||||
|
}
|
||||||
|
|
||||||
/* Abort MINIX. */
|
/* Abort MINIX. */
|
||||||
minix_shutdown(NULL);
|
minix_shutdown(NULL);
|
||||||
|
@ -80,12 +82,13 @@ int c; /* character to append */
|
||||||
kmess.km_next = (kmess.km_next + 1) % _KMESS_BUF_SIZE;
|
kmess.km_next = (kmess.km_next + 1) % _KMESS_BUF_SIZE;
|
||||||
} else {
|
} else {
|
||||||
int p, outprocs[] = OUTPUT_PROCS_ARRAY;
|
int p, outprocs[] = OUTPUT_PROCS_ARRAY;
|
||||||
if(do_serial_debug) return;
|
if(!(minix_panicing || do_serial_debug)) {
|
||||||
if(minix_panicing || do_serial_debug) return;
|
for(p = 0; outprocs[p] != NONE; p++) {
|
||||||
for(p = 0; outprocs[p] != NONE; p++) {
|
if(isokprocn(outprocs[p]) && !isemptyn(outprocs[p])) {
|
||||||
if(isokprocn(outprocs[p]) && !isemptyn(outprocs[p])) {
|
send_sig(outprocs[p], SIGKMESS);
|
||||||
send_sig(outprocs[p], SIGKMESS);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue