1 From fca2519ebf25db61da132932eb3fffeaa1974f43 Mon Sep 17 00:00:00 2001
2 From: =?utf-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
3 Date: Thu, 15 Jan 2009 19:07:27 -0800
4 Subject: [PATCH 109/134] Revert "printk: remove unused code from kernel/printk.c"
6 This reverts commit acff181d3574244e651913df77332e897b88bff4.
8 kernel/printk.c | 39 +++++++++++++++++++++++++++++++++++++++
9 1 files changed, 39 insertions(+), 0 deletions(-)
13 @@ -255,6 +255,45 @@ static inline void boot_delay_msec(void)
17 + * Return the number of unread characters in the log buffer.
19 +static int log_buf_get_len(void)
21 + return logged_chars;
25 + * Copy a range of characters from the log buffer.
27 +int log_buf_copy(char *dest, int idx, int len)
30 + bool took_lock = false;
32 + if (!oops_in_progress) {
33 + spin_lock_irq(&logbuf_lock);
37 + max = log_buf_get_len();
38 + if (idx < 0 || idx >= max) {
44 + idx += (log_end - max);
46 + dest[len] = LOG_BUF(idx + len);
50 + spin_unlock_irq(&logbuf_lock);
56 * Commands to do_syslog:
58 * 0 -- Close the log. Currently a NOP.