printk,kdb: capture printk() when in kdb shell
Certain calls from the kdb shell will call out to printk(), and any of
these calls should get vectored back to the kdb_printf() so that the
kdb pager and processing can be used, as well as to properly channel
I/O to the polled I/O devices.
CC: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
diff --git a/include/linux/kdb.h b/include/linux/kdb.h
index d72fa39..ccb2b3e 100644
--- a/include/linux/kdb.h
+++ b/include/linux/kdb.h
@@ -78,6 +78,9 @@
KDB_REASON_SSTEP, /* Single Step trap. - regs valid */
} kdb_reason_t;
+extern int kdb_trap_printk;
+extern int vkdb_printf(const char *fmt, va_list args)
+ __attribute__ ((format (printf, 1, 0)));
extern int kdb_printf(const char *, ...)
__attribute__ ((format (printf, 1, 2)));
typedef int (*kdb_printf_t)(const char *, ...)