aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/printk.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/printk.c')
-rw-r--r--kernel/printk.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index 75077ad0b537..9213b8b5bb4f 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -413,6 +413,22 @@ SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len)
413 return do_syslog(type, buf, len, SYSLOG_FROM_CALL); 413 return do_syslog(type, buf, len, SYSLOG_FROM_CALL);
414} 414}
415 415
416#ifdef CONFIG_KGDB_KDB
417/* kdb dmesg command needs access to the syslog buffer. do_syslog()
418 * uses locks so it cannot be used during debugging. Just tell kdb
419 * where the start and end of the physical and logical logs are. This
420 * is equivalent to do_syslog(3).
421 */
422void kdb_syslog_data(char *syslog_data[4])
423{
424 syslog_data[0] = log_buf;
425 syslog_data[1] = log_buf + log_buf_len;
426 syslog_data[2] = log_buf + log_end -
427 (logged_chars < log_buf_len ? logged_chars : log_buf_len);
428 syslog_data[3] = log_buf + log_end;
429}
430#endif /* CONFIG_KGDB_KDB */
431
416/* 432/*
417 * Call the console drivers on a range of log_buf 433 * Call the console drivers on a range of log_buf
418 */ 434 */