Blame 0042-log-to-kmsg-when-debug-is-used-on-the-kernel-command.patch
|
Harald Hoyer |
db3a9f |
From ea7df0ea7dd50f119f5f6b8cecffdbbbe49deda0 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
db3a9f |
From: Kay Sievers <kay@vrfy.org>
|
|
Harald Hoyer |
db3a9f |
Date: Tue, 27 Aug 2013 18:25:06 +0200
|
|
Harald Hoyer |
db3a9f |
Subject: [PATCH] log to kmsg when "debug" is used on the kernel command line
|
|
Harald Hoyer |
db3a9f |
|
|
Harald Hoyer |
db3a9f |
---
|
|
Harald Hoyer |
db3a9f |
src/core/main.c | 9 +++++++--
|
|
Harald Hoyer |
db3a9f |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
Harald Hoyer |
db3a9f |
|
|
Harald Hoyer |
db3a9f |
diff --git a/src/core/main.c b/src/core/main.c
|
|
Harald Hoyer |
db3a9f |
index 77cdcfe..716def7 100644
|
|
Harald Hoyer |
db3a9f |
--- a/src/core/main.c
|
|
Harald Hoyer |
db3a9f |
+++ b/src/core/main.c
|
|
Harald Hoyer |
db3a9f |
@@ -413,9 +413,14 @@ static int parse_proc_cmdline_word(const char *word) {
|
|
Harald Hoyer |
db3a9f |
|
|
Harald Hoyer |
db3a9f |
} else if (streq(word, "quiet"))
|
|
Harald Hoyer |
db3a9f |
arg_show_status = false;
|
|
Harald Hoyer |
db3a9f |
- else if (streq(word, "debug"))
|
|
Harald Hoyer |
db3a9f |
+ else if (streq(word, "debug")) {
|
|
Harald Hoyer |
db3a9f |
+ /* Log to kmsg, the journal socket will fill up before the
|
|
Harald Hoyer |
db3a9f |
+ * journal is started and tools running during that time
|
|
Harald Hoyer |
db3a9f |
+ * will block with every log message for for 60 seconds,
|
|
Harald Hoyer |
db3a9f |
+ * before they give up. */
|
|
Harald Hoyer |
db3a9f |
log_set_max_level(LOG_DEBUG);
|
|
Harald Hoyer |
db3a9f |
- else if (!in_initrd()) {
|
|
Harald Hoyer |
db3a9f |
+ log_set_target(LOG_TARGET_KMSG);
|
|
Harald Hoyer |
db3a9f |
+ } else if (!in_initrd()) {
|
|
Harald Hoyer |
db3a9f |
unsigned i;
|
|
Harald Hoyer |
db3a9f |
|
|
Harald Hoyer |
db3a9f |
/* SysV compatibility */
|