diff options
| -rw-r--r-- | kernel/printk.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index d87ca5c6a989..6c3d5bf14da2 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
| @@ -216,6 +216,7 @@ struct log { | |||
| 216 | */ | 216 | */ |
| 217 | static DEFINE_RAW_SPINLOCK(logbuf_lock); | 217 | static DEFINE_RAW_SPINLOCK(logbuf_lock); |
| 218 | 218 | ||
| 219 | #ifdef CONFIG_PRINTK | ||
| 219 | /* the next printk record to read by syslog(READ) or /proc/kmsg */ | 220 | /* the next printk record to read by syslog(READ) or /proc/kmsg */ |
| 220 | static u64 syslog_seq; | 221 | static u64 syslog_seq; |
| 221 | static u32 syslog_idx; | 222 | static u32 syslog_idx; |
| @@ -228,7 +229,6 @@ static u32 log_first_idx; | |||
| 228 | 229 | ||
| 229 | /* index and sequence number of the next record to store in the buffer */ | 230 | /* index and sequence number of the next record to store in the buffer */ |
| 230 | static u64 log_next_seq; | 231 | static u64 log_next_seq; |
| 231 | #ifdef CONFIG_PRINTK | ||
| 232 | static u32 log_next_idx; | 232 | static u32 log_next_idx; |
| 233 | 233 | ||
| 234 | /* the next printk record to read after the last 'clear' command */ | 234 | /* the next printk record to read after the last 'clear' command */ |
| @@ -1635,10 +1635,17 @@ asmlinkage int printk(const char *fmt, ...) | |||
| 1635 | } | 1635 | } |
| 1636 | EXPORT_SYMBOL(printk); | 1636 | EXPORT_SYMBOL(printk); |
| 1637 | 1637 | ||
| 1638 | #else | 1638 | #else /* CONFIG_PRINTK */ |
| 1639 | 1639 | ||
| 1640 | #define LOG_LINE_MAX 0 | 1640 | #define LOG_LINE_MAX 0 |
| 1641 | #define PREFIX_MAX 0 | 1641 | #define PREFIX_MAX 0 |
| 1642 | #define LOG_LINE_MAX 0 | ||
| 1643 | static u64 syslog_seq; | ||
| 1644 | static u32 syslog_idx; | ||
| 1645 | static enum log_flags syslog_prev; | ||
| 1646 | static u64 log_first_seq; | ||
| 1647 | static u32 log_first_idx; | ||
| 1648 | static u64 log_next_seq; | ||
| 1642 | static struct cont { | 1649 | static struct cont { |
| 1643 | size_t len; | 1650 | size_t len; |
| 1644 | size_t cons; | 1651 | size_t cons; |
