diff options
author | Petr Mladek <pmladek@suse.com> | 2020-12-14 15:14:57 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2020-12-14 15:14:57 +0100 |
commit | 5f3b8d398601055f29f32986a94d55955cd48f09 (patch) | |
tree | 9d1ccae747f39c27ecaff8e23f8e760d996ae2ee /kernel/printk | |
parent | b031a684bfd01d633c79d281bd0cf11c2f834ada (diff) | |
parent | 3cffa06aeef7ece30f6b5ac0ea51f264e8fea4d0 (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')
-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; |