--- zzzz-none-000/linux-2.6.13.1/kernel/panic.c 2005-09-10 02:42:58.000000000 +0000 +++ ohio-7170-487/linux-2.6.13.1/kernel/panic.c 2007-11-28 12:57:40.000000000 +0000 @@ -20,7 +20,11 @@ #include #include -int panic_timeout; +#ifdef CONFIG_TFFS_PANIC_LOG +#include +#endif /*--- #ifdef CONFIG_TFFS_PANIC_LOG ---*/ + +int panic_timeout = 5; int panic_on_oops; int tainted; @@ -64,6 +68,9 @@ unsigned long caller = (unsigned long) __builtin_return_address(0); #endif + restore_printk(); /*--- standard-printk ---*/ + dump_stack(); + /* * It's possible to come here directly from a panic-assertion and not * have preempt disabled. Some functions called from here want @@ -93,6 +100,22 @@ */ smp_send_stop(); #endif +#ifdef CONFIG_TFFS_PANIC_LOG + { + char *buf; + unsigned long end; + unsigned long anzahl; + unsigned long len = printk_get_buffer(&buf, &end, &anzahl); + tffs_panic_log_open(); + if(anzahl < len) { /*--- alles im Buffer ---*/ + tffs_panic_log_write(buf, anzahl); + } else { + tffs_panic_log_write(buf + end, len - end); + tffs_panic_log_write(buf, end); + } + tffs_panic_log_close(); + } +#endif /*--- #ifdef CONFIG_TFFS_PANIC_LOG ---*/ notifier_call_chain(&panic_notifier_list, 0, buf);