diff options
author | 2020-12-14 15:14:57 +0100 | |
---|---|---|
committer | 2020-12-14 15:14:57 +0100 | |
commit | 5f3b8d398601055f29f32986a94d55955cd48f09 (patch) | |
tree | 9d1ccae747f39c27ecaff8e23f8e760d996ae2ee /kernel/printk/printk.c | |
parent | printk: remove logbuf_lock writer-protection of ringbuffer (diff) | |
parent | printk/console: Allow to disable console output by using console="" or consol... (diff) | |
download | linux-5f3b8d398601055f29f32986a94d55955cd48f09.tar.gz linux-5f3b8d398601055f29f32986a94d55955cd48f09.tar.bz2 linux-5f3b8d398601055f29f32986a94d55955cd48f09.zip |
Merge branch 'for-5.11-null-console' into for-linus
Diffstat (limited to 'kernel/printk/printk.c')
-rw-r--r-- | kernel/printk/printk.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index c8847ee571f0..ccbdac579bd0 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2236,8 +2236,15 @@ static int __init console_setup(char *str) char *s, *options, *brl_options = NULL; int idx; - if (str[0] == 0) + /* + * console="" or console=null have been suggested as a way to + * disable console output. Use ttynull that has been created + * for exacly this purpose. + */ + if (str[0] == 0 || strcmp(str, "null") == 0) { + __add_preferred_console("ttynull", 0, NULL, NULL, true); return 1; + } if (_braille_console_setup(&str, &brl_options)) return 1; |