lkml.org 
[lkml]   [2022]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] printk: Set console_set_on_cmdline=1 when using console="" or console=null
In case of using console="" or console=null set console_set_on_cmdline=1
to disable chosen{ "stdout-path" } node from devicetree.

To jump out from drivers/of/base.c, line 2087 of_console_check function
with false.

Signed-off-by: Andre Kalb <andre.kalb@sma.de>
---
kernel/printk/printk.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 82abfaf3c2aa..df5ab35b8af2 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2385,6 +2385,7 @@ static int __init console_setup(char *str)
*/
if (str[0] == 0 || strcmp(str, "null") == 0) {
__add_preferred_console("ttynull", 0, NULL, NULL, true);
+ console_set_on_cmdline = 1;
return 1;
}

--
2.31.1
\
 
 \ /
  Last update: 2022-01-28 00:03    [W:0.076 / U:1.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site